*jancis38* Posted March 11, 2008 Report Posted March 11, 2008 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. ;(
Aikss Posted March 11, 2008 Report Posted March 11, 2008 (edited) Uzliekot error_reporting uz 6143 neko neparāda? Šādi uzliekot man strādā! $login = 'nick'; $password = 'passis'; $pass = array("nick:|:passis"); Edited March 11, 2008 by Aikss
andrisp Posted March 11, 2008 Report Posted March 11, 2008 *jancis38*, ieliec, lūdzu, vispirms normāli indentētu (pareizi saliktas atkāpes no kreisās malas) kodu.
rpr Posted March 11, 2008 Report Posted March 11, 2008 ja jau raksti kodu, tad error reportings kaa reizi jaaliek uz e_all
Recommended Posts