crawlerbasher Posted February 9, 2007 Share Posted February 9, 2007 I'm having a bit of a problem with my cookies using php. I've manage to set it and also delete it with no problem at all. The part I'm having problem is with the script not executing the correct feilds when there is a cookie in place. if (isset($COOKIE['FFXIGuild'])) { echo "You can now acsses the secreat page"; } else { echo "You have not loged in"; } When there is no cookies it should go to the last statment, and if there is a cookie it should go to the first statment. But with or with out the cookies, it goes to the last statment all the time. Link to comment https://forums.phpfreaks.com/topic/37798-solved-cookie-problem/ Share on other sites More sharing options...
Balmung-San Posted February 9, 2007 Share Posted February 9, 2007 You're missing the _ It should be $_COOKIE['FFXIGuild']. Link to comment https://forums.phpfreaks.com/topic/37798-solved-cookie-problem/#findComment-180832 Share on other sites More sharing options...
sspoke Posted February 9, 2007 Share Posted February 9, 2007 ya and using cookies to go to a secret access page is pretty crazy securitywise Link to comment https://forums.phpfreaks.com/topic/37798-solved-cookie-problem/#findComment-180833 Share on other sites More sharing options...
crawlerbasher Posted February 9, 2007 Author Share Posted February 9, 2007 Thanks, no wounder it was not working. Link to comment https://forums.phpfreaks.com/topic/37798-solved-cookie-problem/#findComment-180834 Share on other sites More sharing options...
crawlerbasher Posted February 9, 2007 Author Share Posted February 9, 2007 ya and using cookies to go to a secret access page is pretty crazy securitywise I know, but that was just an exsample, the acutaly page is in that part of the statment. Link to comment https://forums.phpfreaks.com/topic/37798-solved-cookie-problem/#findComment-180837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.