Which page posted

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
Wootah
Forum Newbie
Posts: 13
Joined: Wed Jul 14, 2010 7:08 pm

Which page posted

Post by Wootah »

Hi all,

I am hopeful that there is a php variable that tells me which page posted the current page without using sessions or querystrings.

I am using sessions currently but just wondered.

Thanks,

Mat
divedj
Forum Commoner
Posts: 47
Joined: Wed Dec 29, 2010 4:32 am
Location: Malta

Re: Which page posted

Post by divedj »

$_SERVER['HTTP_REFERER'] is holding the refering page. You got to be a bir careful how you use it. Soon as you hit the browsers refresh button, $_SERVER['HTTP_REFERER'] will refer to the page you are currently on.

If it is realy important to be able to go back to the refering page or the refering page is needed for whatever important reason I would still use a session.
Wootah
Forum Newbie
Posts: 13
Joined: Wed Jul 14, 2010 7:08 pm

Re: Which page posted

Post by Wootah »

thanks mate.
Post Reply