Hi ive written this script to authenticate a user, but i eithe keep gettting a parse error for on the line just after the PHP tags, or hwen i test it locally i get a 500 Server error.
When i check the server error log i get this message
[error] [client 127.0.0.1] Premature end of script headers:
Thus is the code iam using:
<?
if ($POST[op] == "ds") {
if (($POST[username] != "admin") || ($_POST[password] != "mbc123")) {
header("Location: http://0000.00.000.0/login.htm");
exit;
}
$cookie_name = "auth";
$cookie_value = "ok";
$cookie_expire = "0";
$cookie_domain = "00.000.000.00";
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);
header("Location: http://00.00.000.0/update_menu.php");
?>
Its just a very very simple script to check password and username details.
i dont know what im doing wrong. Is there a better alternative??
(The IP address have been replace with examples)
Thanks