Reaper0167 Posted July 2, 2009 Share Posted July 2, 2009 no matter what info I enter in the text field.. i get the error of incorrect info. <?php include "connection.php"; $code = mysql_real_escape_string($_POST['code']); $newpass = md5($_POST['newpass']); $deliver = "SELECT id FROM members WHERE pass_auth = '$code' LIMIT 1"; $ice = mysql_query($deliver); $fire = mysql_num_rows($ice); $dippy = mysql_fetch_assoc($ice); $frosty = $dippy['id']; if($fire == 1) { $sql = "UPDATE members SET password = '$newpass' WHERE id = '$frosty'"; if(mysql_query($sql)) { //confirmation of password reset } else { //system down, please try again later } } else { //incorrect information. please check your form. } mysql_close(); ?> Quote Link to comment Share on other sites More sharing options...
ldougherty Posted July 2, 2009 Share Posted July 2, 2009 Well if you are always getting the incorrect info area that means that your variable $fire does not equal 1. I suggest outputting your variables along the line to see what is happening. For example before your if statement add echo "fire is $fire<br>"; This will atleast tell you the value and give you an idea of what might be wrong. 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.