Jump to content

header question


Lucky2710

Recommended Posts

I currently have a login script in place on my site and to get to certain pages you have to be logged in to get to.

 

So when a user tries to go to one of those pages and is not logged in it sends them to the login page (which is great)

But on the login page once they login it uses "  header('Location: index.php')    " to automatically send them to the index page logged in.

 

How can i dynamically see what page they are coming from that way when they login I can send them back to where they where trying to get to to begin with. (like if they click on "Profile" and they are not logged in it sends them to "login" then they login and it currently sends them to "index" I want it to dynamically know to send them back to "profile" instead)

 

If this doesn't make sense and i will try and explain it better

But if you understand and know how to do this please help

 

Thanks ahead of time!

Link to comment
https://forums.phpfreaks.com/topic/217499-header-question/
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.