O to jest kod przypominający hasło. :
>
<?php require("config.php"); $domena = $_SERVER['HTTP_HOST']; $skrypt= $_SERVER['SCRIPT_NAME']; $parametry = $_SERVER['QUERY_STRING']; $address = $domena . $skrypt. '?' . $parametry; $headers = 'From: NADAWCA' . "\r\n" . 'Reply-To: NADAWCA' . "\r\n" . } $checkkey = 'SELECT * FROM users WHERE activation_key="'.$key.'"'; if(!$ck[1]) { echo ' Incorrect or used activation key. '; exit; } } $checkkey = 'SELECT * FROM users WHERE activation_key="'.$key.'"'; $useremail = $rekord['email']; $newhash = sha1($new); $query = "UPDATE user SET password='".$newhash."' WHERE activation_key='".$key."';"; $to = ''.$useremail.''; $subject = 'New password'; $message = 'Welcome , your current password: '.$new.''; $finish = "UPDATE user SET activation_key='0' WHERE email='".$useremail."';"; exit; } echo '<form method="post" action="#"> Your Email: <input type="text" name="email"/> <input type="submit" value="Send password"/>'; exit; } exit; } if(!$checkemail[1]) { echo ' The email does not exist in database..'; } elseif($checkemail[1]) { $query = "UPDATE user SET activation_key='".$new."' WHERE email='".$email."';"; $to = ''.$email.''; $subject = 'New password'; $message = 'Hi , if you want to change the password on: http://'.$address.'key='.$new.''; } } ?