query($abfrage); $zaehler=$check->num_rows; $check->free(); if ($zaehler>0) { # Neues Password erzeugen und eintragen $pool = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; srand ((double)microtime()*1000000); for($index = 0; $index < 8; $index++) { $pass_word .= substr($pool,(rand()%(strlen ($pool))), 1); } $abfrage = "UPDATE users SET u_password=MD5('$pass_word') WHERE u_email='$u_email'"; $eintragen = $db->query($abfrage); $display="confirmation"; # Mail verschicken $mail_topic = _pwdreset_topic; $mail_text = _pwdreset_text.$pass_word; $mail_from = _registermail_sendaddress; mail($u_email,$mail_topic,$mail_text,$mail_from); } else { $display="notfound"; } } ?> _pwdreset

_pwdreset

_pwdreset_confirmation

close(); ?>