Hallo,
also ich habe für meine HP eine Passwort-Einstellung erstellt:
PHP-Code:
<?php if(!isset($_POST['submit'])) { ?>
<form method="post" action="<?php $PHP_SELF ?>">
<table width="400" border="0" cellpadding="5" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td colspan="2"><center>
Passwort-Ändern
</center></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="143">Neues Passwort :: </td>
<td width="234"><input name="pass" type="password" id="pass13" style="margin-bottom:10px; border: 1px solid #444444; background-color:#EEEEEE;" size="35"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>Passwort wiederholen ::</td>
<td><input name="pass1" type="password" id="pass1" style="margin-bottom:10px; border: 1px solid #444444; background-color:#EEEEEE;" size="35"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="3"><center><input name="submit" type="submit" style="margin-bottom:10px; border: 1px solid #444444; background-color:#EEEEEE;" value="Ändern">
</center></td>
</tr>
</table>
</form>
<?php
if ($_POST['pass'] == ""){
echo "Du brauchst ein Passwort!";}
if ($_POST['pass1'] == $_POST['pass']){
$pass = md5 ($_POST['pass']);
$result = "UPDATE *tabelle* SET pass = '".$pass."' WHERE user = '".$_SESSION['user']."'";
mysql_query($result);
}else{
echo "Die Passwörter stimmen nicht überein!";}
}
?>
eigentlich alles eindeutig....
Aber wenn ich die seite aufrufe da wurde der Button submit schon
betätigt!!!
Wieso das?
Kann mir jemand bitte helfen?