השגיאה:
ציטוט:
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", $password, time() + 3600);
setcookie("access", $access, time() + 3600);
echo "<meta http-equiv='refresh' content='10; url=index.php'>";
}
?> </center>
<?
ob_end_flush();
?>