...

View Full Version : unexpected T_BOOLEAN



TrainReq
06-04-2007, 03:29 AM
whats wrong with this coding to make it cause the error: unexpected T_BOOLEAN_OR



if($_SERVER['HTTP_REFERER'] =="http://profileawareness.com/forums/") || (if($_SERVER['HTTP_REFERER'] =="http://profileawareness.com/forums/"));

whizard
06-04-2007, 03:31 AM
Get rid of the first two closing parantheses in the if statement

(The ones right after index.php" and .com")

HTH
Dan

TrainReq
06-04-2007, 03:33 AM
closing patterns?

whizard
06-04-2007, 03:34 AM
This is what the line should look like:

if($_SERVER['HTTP_REFERER'] =="http://www.site.com/index.php" || $_SERVER['HTTP_REFERER'] =="http://www.site.com");

HTH
Dan

TrainReq
06-04-2007, 03:36 AM
now it says unexpected ';'

whizard
06-04-2007, 03:39 AM
Oops, didn't catch that... if statements don't end in semicolons:


if(condition)
{
//then do this
}


HTH
Dan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum