"; } } } } if($Test != "false" or $Test == "true") { ?>
"; } else { $sql = "SELECT * from tableuser WHERE Username = '$loguser' AND Email = '$logmail'"; $result = mysql_query($sql); if(!mysql_num_rows($result)) { $Test = "true"; echo ""; } if(mysql_num_rows($result)) { while($row = mysql_fetch_object($result)) { $ID = $row->User_ID; $Signatur = $row->Forename." ".$row->Surname; } function RandPass() { $randomPassword = ""; srand((double)microtime()*1000000); for($i=0;$i<10;$i++) { $randnumber = rand(48,120); while (($randnumber >= 58 && $randnumber <= 64) || ($randnumber >= 91 && $randnumber <= 96)) { $randnumber = rand(48,120); } $randomPassword .= chr($randnumber); } return $randomPassword; } $string = RandPass(); $string1 = md5($string); $sql1 = "UPDATE tableuser SET Password = '$string1' WHERE User_ID = '$ID'"; $result1 = mysql_query($sql1); if($sql1) { $msg = "
Please complete user name AND email address.
Please check your data. No such user was found in the registry database.
Dear ".$Signatur.".

Your password has been changed successfully.
Your new password: ".$string."

For security reasons, please change this password once you logged in.


Sincerely,
The DNA Bank Network Team
"; $from = "From: contact@dnabank-network.org\n"; $from .= "Content-Type: text/html\n"; mail($logmail, "DNA Bank Network - New Password", $msg, $from); $Test = "false"; echo "
Dear customer.
You will immediately receive an email with your new password.

Login - Forgot your password

Please enter user name and email address. You will receive an email with your new password. You can modify your data at any time.
User name:
Email: