ted_chou12 Posted January 4, 2007 Share Posted January 4, 2007 I have a login script that uses both cookie and session , however, the life of session is very short, so I wish to know how to check if cookies are enabled, so that the page could tell the users that they should enable their cookie?ThanksTed Link to comment https://forums.phpfreaks.com/topic/32871-how-to-check-if-cookie-is-enabled/ Share on other sites More sharing options...
ki Posted January 4, 2007 Share Posted January 4, 2007 [code]<?if (isset($_COOKIE['name'])) {echo "You've got cookies!";} else {echo "No cookies for you!";}?>[/code]Try that Link to comment https://forums.phpfreaks.com/topic/32871-how-to-check-if-cookie-is-enabled/#findComment-153030 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.