WEBI
Neues Mitglied
Hallo,
ich weiß, dass wurde bestimmt schon tausend mal gefragt, aber ich komm bei meinem code einfach nicht weiter. Achtung PHP Anfänger
Ich möchte eine ganz einfache Passwortabfrage machen, doch wenn ich als Benutz.: hallo und als Passwort: nein eingebe, was ja stimmt, heißt es trotzdem "Probier´s nochmal".
Was stimmt da nicht...??
Code log.html:
Code log.php
Gruß
WEBI
[/code]
ich weiß, dass wurde bestimmt schon tausend mal gefragt, aber ich komm bei meinem code einfach nicht weiter. Achtung PHP Anfänger
Ich möchte eine ganz einfache Passwortabfrage machen, doch wenn ich als Benutz.: hallo und als Passwort: nein eingebe, was ja stimmt, heißt es trotzdem "Probier´s nochmal".
Was stimmt da nicht...??
Code log.html:
Code:
<html>
<head>
</head>
<body>
<form action="log.php" method="post">
<center>
Benutzername:
<input type="text" size="10" name="user">
Passwort:
<input type="text" size="10" name="passwort">
<input type="submit" value="Log in">
</center>
</form>
</html>
Code log.php
Code:
<?
if($user == "hallo" && $passwort =="nein")
{
echo "Juhu, hier bin ich";
}
else
{
echo "Probier´s nochmal";
}
?>
Gruß
WEBI
![Wink :wink: :wink:](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)
[/code]