View Single Post
ישן 10-06-07, 19:06   # 1
X-T
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jan 2007
הודעות: 1,021

X-T לא מחובר  

בעיה מוזרה עם התחברות( שליחת קוקיז למשתמש )

השגיאה:
ציטוט:
Warning: Cannot modify header information - headers already sent

Warning: Cannot modify header information - headers already sent

Warning: Cannot modify header information - headers already sent
הקוד:
PHP קוד:
<?
ob_start
();
?>
<center>
<? 
include "global/global.php";
$submit $_POST['submit'];
$username $_POST['username'];
$password $_POST['password'];

if(
$submit) {
$sql " SELECT * FROM members WHERE username = '$username' AND password = '$password' "
    
$result mysql_query($sql) or die("בעייה : " mysql_error()); 
    while (
$row mysql_fetch_array($result)) { 
        
$username $row["username"]; 
        
$password $row["password"];
        
$access $row["access"];
        }
if(!
mysql_num_rows($result)) {
echo 
"שם משתמש או סיסמה שגויים";
exit();
}
    
setcookie("user"$username,time() + 3600);
    
setcookie("pw"$passwordtime() + 3600);
    
setcookie("access"$accesstime() + 3600);
echo 
"<meta http-equiv='refresh' content='10; url=index.php'>";
}
?> </center>
<?
ob_end_flush
();
?>
__________________
You don't shine if you don't glow
  Reply With Quote