Kód: Vybrať všetko
$heslo = array('heslo1','heslo1');
$meno = $_POST['heslo'];
setcookie ("password", "$meno", time() + 60*60*24 , "", "");
session_start();
$pass = $_POST['heslo'];
if (array_search($pass, $heslo)!== FALSE) {
$_SESSION['authuser'] = 1;
}
else {
include ('zle_heslo.php');
exit();
}