Ok - thanks - my new redirect.php is


<?php
if ($fred != "") {
#     $statement = "UPDATE links SET hits=hits+1 WHERE href=\"$u\"";
#     mysql_query($statement);
    Header("Location: $fred");
    exit;
} else {
    Header("Location: $HTTP_REFERRER");
    exit;
}
?>

I get the following message...

Warning: Cannot add header information - headers already sent by (output
started at /home/swadie/public_html/redirect.php:2) in
/home/swadie/public_html/redirect.php on line 9


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Wade
Youth Outreach Coordinator
Fusion Australia Ltd (Sydney North)
ABN 26 001 273 105
+61 2 9477 1110


-----Original Message-----
From: Rares [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 10 May 2001 21:33
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Newbie redirect/variable question


hey! what's that 'echo'  doing there?
if you want to use header (and you want to) it must be the firts thing you
output from your script
so.. first of all loose the 'echo' stuff

----- Original Message -----
From: "Steve Wade" <[EMAIL PROTECTED]>


> Here's redirect.php:
> <?php
> echo $fred;



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to