840Part VCase StudiesFigure 44-3:Forgot Password formListing 44-7:E-mail and (Web hosting control panel)

840Part VCase StudiesFigure 44-3:Forgot Password formListing 44-7:E-mail and password editing functions(emailpass_funcs.inc) = 6) { // Is the old password correct? if (strlen($_POST[ old_password ]) > 1) { $change_user_name = strtolower($_COOKIE[ user_name ]); $old_password = strtolower($_POST[ old_password ]); $crypt_pass = md5($old_password); $new_password1 = strtolower($_POST[ new_password1 ]); $query = SELECT * FROM userWHERE user_name = $change_user_name AND password = $crypt_pass ; $result = mysql_query($query); if (!$result || mysql_num_rows($result) < 1) { $feedback = ERROR--User not found or bad password ; return $feedback; } else { $crypt_newpass = md5($new_password1); $query = UPDATE userSET password = $crypt_newpass WHERE user_name = $change_user_name AND password = $crypt_pass ;
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply