Skripts:
<?php
error_reporting(0);
$login = $_POST['login'];
$password = $_POST['password'];
$pass = array_map('trim', file("paroles.ini"));
$log = "0";
foreach($pass as $user)
{
$case = explode(":|:", $user);
if($login == $case[0] && $password == $case[1])
{
$log = "1";
}}
if($log == "1")
{
setcookie("login", $login, time()+3600);
setcookie("password", $password, time()+3600);
echo 'a';
} else {
die("Ievadītie dati nav pareizi!");
}
?>
Cik es saprotu man vis ir pareizi, bet cookie neuzliekās. ;(