e4games Posted August 23, 2009 Share Posted August 23, 2009 So I know how to add cookies to my site but how do I make it so if there is a cookie users see certain content Link to comment Share on other sites More sharing options...
Ingolme Posted August 23, 2009 Share Posted August 23, 2009 if(isset($_COOKIE['var_name'])) { // Do something} Link to comment Share on other sites More sharing options...
chibineku Posted August 23, 2009 Share Posted August 23, 2009 To elaborate on Ingolme's reply, you can check for the presence of the cookie and display, say, a different menu, or a toolbar with links to the user's profile page or provide a set of links to pages that are hidden from normal viewers (which will each need to check for the presence of the cookie incase someone just arrives by typing the page name in). Or just echo their name so they know they're special. Echo a custom style declaration if you want to let people have that sort of control. There are lodas of possibilities. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.