03-01-2009, 20:46
|
|
|
חבר מתאריך: 06.06.07
הודעות: 749
|
|
כניסה ללולאה
טוב אני לא יודע למה זה קורה
אבל יש לי בעיה עם לולאת WHILE
זה הקוד
קוד PHP:
if ( isset($_POST['login']) && $_POST['login']=="login" ) // did data entered? { //if ( isset($_POST['textuser']) && isset($_POST['textpass']) ) // none of the slots can be blank? //{ $res = mysql_query("SELECT * from users",$link); $canput = 0; while ( $row = mysql_fetch_array($res) ) { if ( !strcmp($row['username'],$_POST['textuser']) && !strcmp($row['password'],$_POST['textpass']) ) // if password and user name true { $canput = 1; break; } } if ( $canput ) {
$_SESSION['username'] = $row['username']; $_SESSION['myid'] = $row['id']; $_SESSION['login'] = 'yes'; $_SESSION['candidate']=''; echo "You are signed in, thx you for login ".$_POST['textuser']; //header('Location:../startpage/Nsummary.php'); } else { echo "<font color='red'>שם המשתמש או הסיסמה לא נמצאים במערכת</font>"; echo "<br/>"; } //} }
על המחשב שלי הכל עובד טוב
אבל על השרת זה לא נכנס ללולאה לבדיקת השוואה
אגב יש לי גם בעית SESSION באתר
בכל האתר יש session_start לפני כל הפקודות שהלקוח יכול לעשות
|