View Single Post
Old 02-15-2004, 08:06 AM  
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
thanks for your reply

i want to make an redirect to another page if a string is in the referer page...i've tryed eregi() and strstr() and both times i get same error

this is the code i used:
PHP Code:
<?
if (strstr($_SERVER['HTTP_REFERER'], "amateur"))
{ header("location: [url]http://www.mydomain.com/amateur.html[/url]"); die();}
?>
and this is the error i get when i come to this page from another page which the "amateur" in the url:


"Cannot add header information - headers already sent by (output started at /home/..............) "

any ideea why i get this error?
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote