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(); ?> Link to comment https://forums.phpfreaks.com/topic/164586-solved-can-you-see-anything-wrong/ 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. Link to comment https://forums.phpfreaks.com/topic/164586-solved-can-you-see-anything-wrong/#findComment-868084 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.