UrbanDweller Posted May 9, 2012 Share Posted May 9, 2012 Hey, I have just started using cookies and have got the basic idea of creating and accessing the simple cookies but now I am wanting to be able to check if a cookie already exists on the users computer before overwriting the current one. <?php if(!isset($_COOKIE['testCookie'])){ setcookie("TestCookie", "username", time() + (24 * 60) ) } ?> <html>....</html> At the moment my page just doesn't get past this piece of code any ideas? Cheers Link to comment https://forums.phpfreaks.com/topic/262283-help-checking-for-existing-cookie/ Share on other sites More sharing options...
UrbanDweller Posted May 9, 2012 Author Share Posted May 9, 2012 Errr got it... ; silly me Link to comment https://forums.phpfreaks.com/topic/262283-help-checking-for-existing-cookie/#findComment-1344159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.