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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.