Jump to content

PHP noob, need help


gvfd

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.