referal

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
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

referal

Post by pinehead18 »

echo $_SERVER['referer'];


I did that trying to get the previous page that i was on. Is that not correct or something? Where in the manual can i find the details.

Thank you
Anthony
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_SERVER['HTTP_REFERER'] I believe..
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

yeah its $_SERVER['HTTP_REFERER']
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

header("location: $_SERVER['HTTP_REFERER']");

ok i'm retarted right now, but this wont work. WTF ami doing wrong.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

header("Location: {$_SERVER['HTTP_REFERER']}");

?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

If that does not work try:

echo "<meta http-equiv=refresh content='1; url=".$_SERVER['HTTP_REFERER']."'> ";
Post Reply