For some reason that may or may not be related to this my cookies have stopped working.
Can anyone advise me what exactly I should have in my setcookie code? I'm thinking I might have to include the domain (which one?!) parameter but I'm not clear on whether I can leave some parameters out or not - and I've read some stuff about 'double dots' etc that I didn't fully understand.
Anyway, here's what I have now (and was working fine until I moved webspaces and used a cloaked redirect):
Code: Select all
<?php
setcookie("UNAME", "$f_user", time()+31536000);
setcookie("USTATUS", "admin", time()+31536000);
setcookie("UPASS", "$encrypt_pass", time()+31536000);
setcookie("UTIMEZONE", "$timecheck->timezone", time()+31536000);
setcookie("UDAYLIGHT", "$timecheck->daylight", time()+31536000);
?>
?>If the site sets the cookie with a domain of 'mattphelps.co.uk' and then someone comes along and gets to the site via 'racesites.net' then I assume that the cookie will be invalid. If I change the cookie domain parameter so that it says 'racesites.net' then will the cookie be valid? Even though the true url is a 'mattphelps.co.uk' url?!?