Continue to page after login

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
brob
Forum Newbie
Posts: 5
Joined: Tue Oct 03, 2006 5:48 am

Continue to page after login

Post by brob »

Hi I want users to be able to click a link to a page that is restricted and once they login they are still taken to that page without having to navigate to it.

Any ideas?

Thanks
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

Post by impulse() »

Do you mean so the link isn't visible to users who aren't logged in?
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Code: Select all

$_SERVER['HTTP_REFERER']
-NSF
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

NonStopableForce wrote:

Code: Select all

$_SERVER['HTTP_REFERER']
-NSF
Sending the HTTP_REFERER field is optional, you cannot rely on it.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

onion2k wrote:
NonStopableForce wrote:

Code: Select all

$_SERVER['HTTP_REFERER']
-NSF
Sending the HTTP_REFERER field is optional, you cannot rely on it.
Or set a Temp Session Var, or have it go to login.php?Back=home.php or something similar... if you dont want to rely on Referer...

-NSF
Post Reply