loginscriptfehler

the_smooth

Grünschnabel
hallo
wenn ich eine variable(passwort) von einem formular mit post übergebe dann acceptiert er das passwort nie

hier der code :

PHP:
<?
$password = "bob";
if($password_eingabe == $password)
{
print "access granted";
}
else 
{
print "Access dinied";
}
?>

und hier das formular:

HTML:
    <form action="password.php" method="POST">
    <input type="text" name="password_eingabe" />
    <input type="submit" value="send" />    
    </form>

was ist falsch?
 
at powerplayer
vielleicht weil du ne ältere php version hastß

at oliver
etwa so?
PHP:
<?
$password = "bob";
if($_POST['password_eingabe'] == $password)
{
print "access granted";
}
else 
{
print "Access dinied";
}
?>
 
Zurück