Demonic Posted October 2, 2006 Share Posted October 2, 2006 Ok I was coding this forgot password script but for some reason when i send then email it doesn't get the email :S any one know why this is happening:[code]<? include "header.php"; ?><?php$get_email = mysql_query("SELECT * FROM users WHERE email='$email'") or die(mysql_error());$email_info = mysql_fetch_array($get_email);$get_url = mysql_query("SELECT * FROM boardstatus WHERE id='1' ") or die(mysql_error());$url_info = mysql_fetch_array($get_url);$email = $_POST['femail'];$subject = "Forgot Password";$headers .= 'From: Webmaster <webmaster@noreply.com>' . "\r\n";$headers .= 'X-Mailer: PHP/' . phpversion();$submit = $_POST['sendpass'];$password = $email_info[password];$uid = $email_info[id];$link = $url_info[url]."/validateaccount.php?uid=".$uid."&pass=".$password;$message = "You have requested to reset your password to do so please visit link and follow steps.\n Visit Link Here: $link \n validate account now. "; if(isset($submit)) { if($email_info[email] = false) { echo "Sorry, but that email is not in our database."; exit; } mail($email,$subject,$message,$headers); }elseif(!isset($submit)) {?><table class='category'> <tr> <td><b>Forgot Email</b></td> </tr></table><table class='forum'> <tr> <td><center><form method='post'><input type='text' name='femail'><br /><input type='submit' name='sendpass' value='Send Validation Link'></form></center></td> </tr></table><table class='lastcatrow'> <tr> <td> </td> </tr></table><? } ?><? include "footer.php"; ?></body></html>[/code]Heres the email:[code]You have requested to reset your password to do so please visit link and follow steps. Visit Link Here: http://*************/nevux1_3_0/validateaccount.php?uid=&pass= validate account now[/code] Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 2, 2006 Share Posted October 2, 2006 I suspect that $email = $_POST['femail'] needs to come [b]before[/b] the MySQL query. If that's not it, can you ask your question more clearly? Quote Link to comment Share on other sites More sharing options...
Demonic Posted October 2, 2006 Author Share Posted October 2, 2006 ROTFL Im dump OMG :othanks for my simply dumb mistake :S Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.