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

PHP Server Side Scripting Forum

    
php find page redirected from
tr8er8




msg:3807558
 1:55 am on Dec 15, 2008 (gmt 0)

hey, i have no clue how to start this one. i need to know how to find the url of the page that i redirected to. what i want, is have a page, and if you dont have enough permissions to view the page, you get redirected to a different page that displays what the error is. the page is going to display different errors for each situation. so im going to do something like:

function redirectedFrom($url) {
//code
}

if(redirectedFrom($url) == $url2) {
echo "error message1";
}

or something similar, you get the point.

 

tr8er8




msg:3807591
 3:54 am on Dec 15, 2008 (gmt 0)

nvm i found another solution

coopster




msg:3807818
 2:04 pm on Dec 15, 2008 (gmt 0)

It's like anything else though with a stateless protocol like HTTP, you have to "carry" the value along one way or another. Each request is a brand new request so to retain the state of the last conversation you must pass values through cookies, the GET query, sessions, etc.

Which method did you employ?

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