Note that there are some explanatory texts on larger screens.

plurals
  1. POWhats wrong with this password reset code?
    text
    copied!<pre><code>&lt;php include 'connect.php'; // table name $tbl_name="temp_members_db"; //Connect to server and select databse. $db = mysql_connect($server, $username, $password) or die ("Unable to connect to Database Server."); mysql_select_db ($database, $db) or die ("Could not select database."); // Random confirmation code $confirm_code=md5(uniqid(rand())); // values sent from form $name=$_POST['name']; $email=$_POST['email']; $password=$_POST['password']; $country=$_POST['country']; $name2="SELECT * FROM $tbl_name WHERE name ='$name'"; $name=mysql_query($name2); $email2="SELECT * FROM $tbl_name WHERE email ='$email'"; $email=mysql_query($email2); $password2="SELECT * FROM $tbl_name WHERE password ='$password'"; $password=mysql_query($password2); $country2="SELECT * FROM $tbl_name WHERE country ='$country'"; $country=mysql_query($country2); // Insert data into database $sql="INSERT INTO $tbl_name(confirm_code, name, email, password, country)VALUES('$confirm_code', '$name2', '$email2', '$password2', '$country2')"; $result=mysql_query($sql); // if suceesfully inserted data into database, send confirmation link to email if($result){ // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to=$email; // Your subject $subject="Your confirmation link here"; // From $header="from: Admin &lt;admin@example.com&gt;"; // Your message $message="Your Comfirmation link \r\n"; $message.="Click on this link to activate your account \r\n"; $message.="http://www.mindcollar.com/testconfirm.php?passkey=$confirm_code"; // send email $sentmail = mail($to,$subject,$message,$header); } // if not found else { echo "Not found your email in our database"; } // if your email succesfully sent if($sentmail){ echo "Your Confirmation link Has Been Sent To Your Email Address."; } else { echo "Cannot send Confirmation link to your e-mail address"; } ?&gt; &lt;table width="350" border="0" align="center" cellpadding="0" cellspacing="0"&gt; &lt;tr&gt; &lt;td&gt;&lt;form name="form1" method="post" action="signup_ac.php"&gt; &lt;table width="100%" border="0" cellspacing="4" cellpadding="0"&gt; &lt;tr&gt; &lt;td colspan="3"&gt;&lt;strong&gt;Sign up&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="76"&gt;Name&lt;/td&gt; &lt;td width="3"&gt;:&lt;/td&gt; &lt;td width="305"&gt;&lt;input name="name" type="text" id="name" size="30"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;E-mail&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt;&lt;input name="email" type="text" id="email" size="30"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;password&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt;&lt;input name="password" type="password" id="password" size="30"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Country&lt;/td&gt; &lt;td&gt;:&lt;/td&gt; &lt;td&gt;&lt;input name="country" type="text" id="country" size="30"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" name="Submit" value="Submit"&gt; &amp;nbsp; &lt;input type="reset" name="Reset" value="Reset"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>I am trying to make a password reset script using this signup page then a confirmation page. but the issue I am having is when I go to "signup" nothing happens, no errors or results. after the form is filled I am just redirected to the same page with just the form reset, nothing error wise comes up. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload