ich bin neu hier und auch ziemlich neu mit PHP beschäftigt.
Nun habe ich ein Problem mit einem lost-password-script welches Bestandteil eines Login ist.
Hier das Script:
- Code: Select all
<html>
<head>
</head>
<body onLoad="this.document.form.email.focus();" leftMargin="0" topMargin="0" MARGINWIDTH="0" MARGINHEIGHT="0" <br>
<?
if($_GET['do'] == "type")
{
?>
<table border=0 align=center cellspacing=0 cellpadding=0 width="370">
<tr>
<td align=center><font face="Arial" size="6" color="#FFFFFF">Login</font>
</td>
</tr>
<tr>
<td<br><center><font face="Arial" size="2" color="#000000"><b>
Passwort anfordern</b></font></center><br>
<center><font face="Arial" size="2" color="#000000">
Geben Sie Ihre E-Mail ein.</font></center><br>
</td>
</tr>
</table>
<table border=0 align=center cellspacing=0 cellpadding=0 width="370">
<form action="lost_pwd.php?do=send" name="form" method="POST">
<tr>
<td align=right><font face="Arial" size="2" color="#000000">
E-Mail: </font>
</td>
<td >
<input type="text" name="email" maxlength="50" size="24">
</td>
</tr>
</table>
<table border=0 align=center cellspacing=0 cellpadding=0 width="370">
<tr>
<td align=right>
</td>
</tr>
<tr>
<td>
<center>
<input type="Submit" name="" value="Passwort zuschicken"></center>
</td>
</tr>
<tr>
<td align=right>
</td>
</tr>
</form>
</table>
<?
}
?>
<?
if($_GET['do'] == "send")
{
?>
<?
$result = mysql_query("SELECT * FROM linker_login WHERE email='".$_POST['email']."'");
if (mysql_num_rows($result)) {
while($row=mysql_fetch_array($result)) {
$email = $row['email'];
srand ((double)microtime()*1000000000);
$zufallszahl1 = rand(1,10000000000);
$zufallszahl = md5($zufallszahl1);
mysql_query("UPDATE linker_login SET passwd='$zufallszahl' WHERE email='".$_POST['email']."'");
echo"Es wurde Ihnen ein neues Passwort an Ihre Mail-Adresse geschickt!";
mail("$email", "Ihr Passwort", "Hallo $nickname,
Ihr neues Passwort lautet: $zufallszahl1", "From: info.holiday.travel@wanadoo.fr");
exit;
}
}
else {
echo"Die von Ihnen eingegebene Mail-Adresse existiert nicht in unserer Datenbank!";
}
?>
<?
}
?>
</body>
</html>
Die Fehlermeldung lautet immer:
Die von Ihnen eingegebene Mail-Adresse existiert nicht in unserer Datenbank!
obwohl ich das mehrmals probiert habe und die Mail-Addresse vorhanden ist.
Kann mir jemand weiterhelfen?
Obi_1