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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.