simple php error, help!

younglungs

Junior Member
Joined
May 10, 2008
Messages
188
Reaction score
35
alright so i'm trying to set up this script for insuring that my referrers are blank before sending them on to e*Bay but i'm getting this error:

Parse error: parse error, unexpected $ in /home/www/my-domain.com/go.php on line 7

and here is the code:

Code:
<?php 
if(trim($_SERVER["HTTP_REFERER"])==""){ 
echo '<meta http-equiv="refresh" content="0;url=ebay-affiliate-url">'; 
}
else
{
echo '<meta http-equiv="refresh" content="0;url=http://www.google.com">';

can anyone help me with this? i know it's something simple but i have absolutely no programming knowledge. thanks!
 
Do you have a closing } to close out the one before the else echo?

Everything looks ok, my knowledge is a little limited also.
 
I just put the closing brace and the final php tag and it worked fine.

Code:
<?php 
if(trim($_SERVER["HTTP_REFERER"])==""){ 
echo '<meta http-equiv="refresh" content="0;url=ebay-affiliate-url">'; 
}
else
{
echo '<meta http-equiv="refresh" content="0;url=http://www.google.com">';
}
?>

Lux
 
Back
Top