*jancis38* Posted March 11, 2008 Report Share 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. ;( Link to comment Share on other sites More sharing options...
Aikss Posted March 11, 2008 Report Share 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 Link to comment Share on other sites More sharing options...
andrisp Posted March 11, 2008 Report Share Posted March 11, 2008 *jancis38*, ieliec, lūdzu, vispirms normāli indentētu (pareizi saliktas atkāpes no kreisās malas) kodu. Link to comment Share on other sites More sharing options...
rpr Posted March 11, 2008 Report Share Posted March 11, 2008 ja jau raksti kodu, tad error reportings kaa reizi jaaliek uz e_all Link to comment Share on other sites More sharing options...
Recommended Posts