I have an internal network running XAMPP. I am trying to set a cookie for an item when someone logs in. I use the following code. $Access
will be a 1 if user authenticates correctly. When a user enters their username and password it passes to a CheckAuth page with the following code.
$Access = authenticateUser($_POST['Username'],$_POST['Password']);
setcookie("Access", $Access, time()+3600);
header('Location:Newpage.php');
On the NewPage it if I do a $_COOKIE['Access']
it will show me 1 and set everything correctly. If I click a link to another page, say Inventory.php, within the same folder, $_COOKIE['Access']
shows 0 instead of 1.
What could be the issue that the cookie is magically gone? I have checked the IE files for the cookie when it is made and it doesn't show up.