help with $_SERVER['HTTP_REFERER']
Posted: Fri Mar 07, 2003 12:41 pm
I need help with a header. I'm linking to the script below to set a cookie and return to the refering page. I have:
But can't get it to work. I get the error:
I used to use
as the refer and it's worked for years, but now with increased security on our server I need to use the - something I'm having trouble getting my head around for some reason.
Any help is greatlt appreciated.
Jon
Code: Select all
<?php
setcookie ('cookiename', $set, time()+31536000, '/', 'www.dom.com', '0');
header(Location: $_SERVERї'HTTP_REFERER']);
?>Code: Select all
"Parse error: parse error, unexpected ':' ..."Code: Select all
header("Location: $HTTP_REFERER");Code: Select all
$_SERVERї'variable']Any help is greatlt appreciated.
Jon