Page 1 of 1

$_SERVER['HTTP_REFERER'] redirect...

Posted: Sun Dec 05, 2004 6:40 pm
by Todd_Z
How do I redirect the site based on the $_SERVER['HTTP_REFERER'] var? I assumed it was simply

Code: Select all

<?php
header("Location: ".$_SERVER['HTTP_REFERER']);
?>
But apparently I was wrong.

Posted: Sun Dec 05, 2004 6:54 pm
by Benjamin
Are you trying to send someone back where they came from?

Posted: Sun Dec 05, 2004 7:03 pm
by Todd_Z
Yea, after I change the style that they set... Follow up question... is there simply a way to add via hyperlink variables to the end of a string... like http://www.website.com/?page=Main ... then they click the link and it goes to everything already there plus &setStyle=Red?

Posted: Sun Dec 05, 2004 7:08 pm
by Benjamin

Code: Select all

<?php
$url = $url . '&setStyle=Red';

?>
Is that what you mean?

Posted: Sun Dec 05, 2004 9:18 pm
by Todd_Z
No, i mean something like <a href="&setStyle=Red">link</a>.... No php involved, can it be done someway?

Posted: Sun Dec 05, 2004 10:27 pm
by Benjamin
You can use javascript to change the css style sheet, which would allow you to change all the colors on a page with a link, if that is what you are trying to do.