corillo181 Posted May 26, 2006 Share Posted May 26, 2006 why does myquery says " PROBLEM HEAR '@WHATEVER.COM"it doesn't select after the @ sign?????????[code]<?phpinclude_once'../includes/db.php';include_once'../includes/header.php';$email=$_POST['email'];$email=stripslashes($email);if($email==""){echo "please enter your email";include'../htmlforms/lost_pw.html';}$checkemail=mysql_query("SELECT password FROM user WHERE email=$email")or die(mysql_error());while($mail=mysql_fetch_array($checkemail)){$password=$mail['password'];$username=$mail['username'];if(!$checkmail){echo"that email is not a active email";include'../htmlforms/lost_pw.html';}else{$subject=" your lost password";$message=" hello this is your lost passwordpassword=$passwordkeep your password in a safe place..This is an automated response, please do not reply!";mail($_POST['email'],$subject,$message);echo "your password has been sent";}}?>[/code]else if some one puts something like hi i'm .. the ' is a problme i thought stripslashes would help.. Link to comment https://forums.phpfreaks.com/topic/10536-cant-select-emialcom/ Share on other sites More sharing options...
nogray Posted May 26, 2006 Share Posted May 26, 2006 you gotta include your email in '' so mysql won't try to read it as commands. [code]$checkemail=mysql_query("SELECT `password` FROM `user` WHERE `email`='$email'")or die(mysql_error());[/code] Link to comment https://forums.phpfreaks.com/topic/10536-cant-select-emialcom/#findComment-39293 Share on other sites More sharing options...
corillo181 Posted May 26, 2006 Author Share Posted May 26, 2006 what do you mean put the ' ' dat doesn't make a diifference.. and still gives me the same error Link to comment https://forums.phpfreaks.com/topic/10536-cant-select-emialcom/#findComment-39310 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.