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 <[email protected]>' . "\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] Link to comment https://forums.phpfreaks.com/topic/22806-forgot-password-mail-script-messen-up-s/ 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? Link to comment https://forums.phpfreaks.com/topic/22806-forgot-password-mail-script-messen-up-s/#findComment-102745 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 Link to comment https://forums.phpfreaks.com/topic/22806-forgot-password-mail-script-messen-up-s/#findComment-102748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.