dAivEd Posted October 2, 2008 Report Share Posted October 2, 2008 Tatad rekur mans kods: if(isset($_COOKIE['id']) and (isset($_COOKIE['password']))) { $check_id = $_COOKIE['id']; $check_pw = $_COOKIE['password']; $query = "SELECT * FROM users WHERE id = '$check_id' and password = '$check_pw' "; $result = mysql_query("$query") or die(mysql_error()); while($row = mysql_fetch_array($result)){ $check_real_pw = $row["password"]; $check_real_id = $row["id"]; } if($check_id == "$check_real_id" AND $check_pw == "$check_real_pw"){ $check_id == $_SESSION['id']; } } Jad taisu: echo " if($check_id == $check_real_id AND $check_pw == $check_real_pw){"; Raada: if(2 == 2 AND fff000d90420ea6417cf33995aefaa135 == fff000d90420ea6417cf33995aefaa135){ Bet cookies nestrada t.b. $_SESSION['id'] ir tukš Kur vaina ? Link to comment Share on other sites More sharing options...
xPtv45z Posted October 2, 2008 Report Share Posted October 2, 2008 Tāpēc, ka šeit tu salīdzini - $check_id == $_SESSION['id']; Un ja arī piešķirtu, tad piešķirtu vērtību $check_id, nevis $_SESSION Link to comment Share on other sites More sharing options...
dAivEd Posted October 2, 2008 Author Report Share Posted October 2, 2008 (edited) Tāpēc, ka šeit tu salīdzini - $check_id == $_SESSION['id'];Un ja arī piešķirtu, tad piešķirtu vērtību $check_id, nevis $_SESSION bljin pareiz !!! Un man vajag arī piešķirt vertību $check_id, tagad noņemu vienu "=", un viss strāda, ak tā neuzmanība ;( Edited October 2, 2008 by dAivEd Link to comment Share on other sites More sharing options...
Recommended Posts