המערכת התחברות בנוי על PHP היא רשומה מצויין אבל זה נותן לי שגיאה במקום מסויים שלא מצאתי פתרון אלייה
Index.php
PHP קוד:
Index.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
UserName:
<label>
<input type="text" name="username" id="username" />
</label>
<p>PassWord:
<label>
<input type="text" name="password" id="password" />
</label>
</p>
<p>
<label>
<input type="submit" name="next" id="next" value="Login" />
</label>
</p>
</form>
</body>
</html>
<?php
session_start();
if (isset($_POST['next']))
{
test();
}
function test()
{
if ($_POST['username'] == "Admin" && $_POST['password'] == "1234")
{
$_SESSION['login'] = "1";
echo "<meta http-equiv='refresh' content='0;URL=panel.php' />";
}
else
{
echo "<center>ôøèéí ùâåééí</center>";
}
}
?>
השגיאה היא:
PHP קוד:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at index.php:15) in index.php on line 30
השגיאה היא לשורה של:
תודה לעוזרים