Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    TrainReq
    Guest

    unexpected T_BOOLEAN

    whats wrong with this coding to make it cause the error: unexpected T_BOOLEAN_OR

    PHP Code:
    if($_SERVER['HTTP_REFERER'] =="http://profileawareness.com/forums/") || (if($_SERVER['HTTP_REFERER'] =="http://profileawareness.com/forums/")); 
    Last edited by TrainReq; 06-04-2007 at 04:34 AM.

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Get rid of the first two closing parantheses in the if statement

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

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    TrainReq
    Guest
    closing patterns?

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    This is what the line should look like:
    PHP Code:
    if($_SERVER['HTTP_REFERER'] =="http://www.site.com/index.php" || $_SERVER['HTTP_REFERER'] =="http://www.site.com"); 
    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    TrainReq
    Guest
    now it says unexpected ';'

  • #6
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Oops, didn't catch that... if statements don't end in semicolons:
    PHP Code:
    if(condition)
    {
    //then do this

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •