I have a real issue with my php cookies not working.
A user logs in, the next page (login_accept) checks this info with the DB, and if authorised I set the cookie for 1 hour before the page loads (before the header etc):
setcookie(‘TheLoginCookie[userid]’, $userid, time()+3600);
setcookie(‘TheLoginCookie[password]’, $password, time()+3600);
setcookie(‘TheLoginCookie[access]’, $access_level, time()+3600);
then, at the top of every other page before the header I call the setcookie function:
setcookie(‘TheLoginCookie[userid]’);
setcookie(‘TheLoginCookie[password]’);
setcookie(‘TheLoginCookie[access]’);
this isn’t working properly. The first page a users calls after logging in works (the cookie is set correctly). But then once another page is selected the cookie doesn’t set?
can anyone help/offer advice?