Kod
<html>
<head>
</head>
<body>
<form method="POST">
Podaj login: </br>
<input type="text" name="login"></br>
Podaj haslo: </br>
<input type="password" name="haslo"></br>
<input type="submit" name="wyslane" value="Wyslij"></br>
<input type="reset" value="Wyczysc">
</form>
<?php
$wyslane=$_POST['wyslane'];
if(isset($wyslane)){
$login=$_POST['login'];
$haslo=$_POST['haslo'];
$id="login";
$hash="haslo";
if($login===$id && $haslo===$hash){
echo "zalogowane";
}
else echo "Złe dane";
}
else echo "Wypełnij pola";
?>
</body>
</html>
<head>
</head>
<body>
<form method="POST">
Podaj login: </br>
<input type="text" name="login"></br>
Podaj haslo: </br>
<input type="password" name="haslo"></br>
<input type="submit" name="wyslane" value="Wyslij"></br>
<input type="reset" value="Wyczysc">
</form>
<?php
$wyslane=$_POST['wyslane'];
if(isset($wyslane)){
$login=$_POST['login'];
$haslo=$_POST['haslo'];
$id="login";
$hash="haslo";
if($login===$id && $haslo===$hash){
echo "zalogowane";
}
else echo "Złe dane";
}
else echo "Wypełnij pola";
?>
</body>
</html>