View Single Post
ישן 04-02-06, 18:59   # 1
iBain
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Feb 2006
הודעות: 98

iBain לא מחובר  

בעייה קטנה בקובץ התחברות( כנראה בקוקיז )

הקובץ מכיל את הקוד הבא
PHP קוד:
<? 
include("db.php");
$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];
if(
$submit) {
$password md5($password); 
$sql " SELECT * FROM users WHERE 1 AND username = '$username' AND password = '$password' AND activated='1' "
    
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
    while (
$row mysql_fetch_array($result)) { 
        
$username $row["username"]; 
        
$password $row["password"];
        
$id $row["id"];
        }
if(!
mysql_num_rows($result)) {
echo 
"שם משתמש או סיסמה שגויים";
exit();
}
        
mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'"); 
    
setcookie("username"$username,time() + 3600);
    
setcookie("password"$passwordtime() + 3600);
    
setcookie("id"$idtime() + 3600);
echo 
"<meta http-equiv='refresh' content='5; url=index.php'>";
}
?>
שגיאה:
ציטוט:

Warning: Cannot modify header information - headers already sent by (output started at /home/checked.php:1) in /home/public_html/checked.php on line 20

Warning: Cannot modify header information - headers already sent by (output started at /home/ibain/domains/ibain.net/public_html/checked.php:1) in /home/public_html/checked.php on line 21

Warning: Cannot modify header information - headers already sent by (output started at /home/ibain/domains/ibain.net/public_html/checked.php:1) in /home/public_html/checked.php on line 22
הדגשתי את השורות שקיימות בהם השגיאה,

מצפה לעזרה בזמן הקרוב.