homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
admin login redirect
whatson




msg:4502126
 8:09 pm on Sep 30, 2012 (gmt 0)

What is the script for redirecting visitors to where they were trying to go.

E.g. someone goes to /admin/edit-page.php, but they are not logged in to the admin, so they are redirected to admin/login.php. Then when they log in they are redirected to /admin/edit-page.php

 

zerokavn




msg:4502215
 2:10 am on Oct 1, 2012 (gmt 0)

You can use url parameter, eg: admin/login.php?redirectUrl=edit-page.php.

Then, after login successfull, check isset(redirectUrl) then redirect to it.

whatson




msg:4502390
 8:43 am on Oct 1, 2012 (gmt 0)

how does it pick up the edit-page.php code in the first place? $_SERVER['http_referrer']?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved