The page to set the cookie (cookies.php):
<?php
//from the login.html page
$user=$POST['username'];
$pass=$POST['password'];
if ($user == "xxx" && $pass == "xxx")
{
setcookie("pass",$user,time()+3600,"/main/c2/");
}
if(isset($_COOKIE["pass"])) {
header("Location: main.php");
}
else {
header("Location: login.html");
}
?>
On login, it displays a blank page and not main.php and at the url it says../..../cookies.php.
If I press reload, then it will display main.php
Any one know what is wrong with my code?
Please advice
THanks
James