Hi all,
I wanted to start by saying, you folks in this forum are just great for a noob such as myself, your efforts are really appreciated!
Now, on to my current cookie problem
Here is how I create the cookie
{
setcookie("loggedin", "TRUE", time()+(3600 * 24));
setcookie("user", "$username");
header("Location: main.php");
}
And my attempt to redirect if cookie is not present
<?php
if (isset($_COOKIE["user"]))
exit;
else
header("Location: login.php");
?>
And so, at this moment it kicks me back to login, even if I am a valid user, I have cookies enabled also.
Any ideas would be great!
Thanks
Thomas