query("UPDATE user_account SET password = '$password', verifyCode = '0' WHERE user_id = '$user_id'"); if($result){ //So this would mean that the update of password was a success //Now we just send them back to sign-in.php pages //Basically stop user from resetting his/her password when he/she gets back unset($_SESSION['user_id']); echo "1"; }else{ //Fix this line to forget password page echo "0"; } ?>