gvfd Posted February 12, 2009 Share Posted February 12, 2009 I'm new to php and I'm struggling. I have a site the I want to create members only links and pages. What I would like is when someone goes to the site it will look to see if they have logged in before and take them to the members area, if not they go to the general access pages. Can this be done. I have the login created with remember me function, just not sure how to make it all work together. If anyone can help or point me to any tutorials that I can reference I would appreciate it. Link to comment https://forums.phpfreaks.com/topic/144983-php-noob-need-help/ Share on other sites More sharing options...
marcus Posted February 12, 2009 Share Posted February 12, 2009 If you set a cookie or a session just check to see if it has the correct value upon the member's only page. Link to comment https://forums.phpfreaks.com/topic/144983-php-noob-need-help/#findComment-760783 Share on other sites More sharing options...
gvfd Posted February 13, 2009 Author Share Posted February 13, 2009 Let me clarify a little more what I'm trying to do. when someone goes to index page I would like it to look for the cookie and if it is there redirect to the member page. If it isn't then the they go to the index page. I'm new to php and I'm not sure how to do that. Link to comment https://forums.phpfreaks.com/topic/144983-php-noob-need-help/#findComment-761346 Share on other sites More sharing options...
allworknoplay Posted February 13, 2009 Share Posted February 13, 2009 Let me clarify a little more what I'm trying to do. when someone goes to index page I would like it to look for the cookie and if it is there redirect to the member page. If it isn't then the they go to the index page. I'm new to php and I'm not sure how to do that. yeah you can check to see which cookies are set. $_COOKIE[]; setcookie(name, value, expire, path, domain); And to view cookies set you can use this: print_r($_COOKIE); based on the cookies available, you can then redirect members to a members page or index. Link to comment https://forums.phpfreaks.com/topic/144983-php-noob-need-help/#findComment-761358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.