sudsy1970 Posted June 21, 2010 Share Posted June 21, 2010 hi all, am trying to write a forgotuser email php script. Basically the email is entered and if it is in the DB then a function of mail_username is called if no email address then an error message for now ( want to redirect and give an error ????) Only trouble is no emails are being recoginsed, can someone help me out please ? $email = ($_POST['email']); $sql = "SELECT user FROM user WHERE email= '$Email'"; $queryResult=mysql_query($sql); $dbRecord=mysql_fetch_array($queryResult); # If an email address has been provided by the customer, email the Username to it if (mysql_num_rows($queryResult)==0) { echo "Not a recognised email address"; } else { mail_username(); } Link to comment https://forums.phpfreaks.com/topic/205462-ifelse-problem/ Share on other sites More sharing options...
kenrbnsn Posted June 21, 2010 Share Posted June 21, 2010 The variables $Email & $email are two different variables. PHP is case sensitive. Ken Link to comment https://forums.phpfreaks.com/topic/205462-ifelse-problem/#findComment-1075212 Share on other sites More sharing options...
sudsy1970 Posted June 21, 2010 Author Share Posted June 21, 2010 Thank you, read through it loads of times and never noticed lol. Link to comment https://forums.phpfreaks.com/topic/205462-ifelse-problem/#findComment-1075216 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.