How to fix "unexpected T_BOOLEAN_AND, expecting ',' or ')'" Syntax error?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan Mcharty
    New Member
    • Dec 2010
    • 1

    #1

    How to fix "unexpected T_BOOLEAN_AND, expecting ',' or ')'" Syntax error?

    Hi, im trying to make a frame for my blog that will popup word from a file

    I used this code from a forum
    Code:
    <?php
    if(isset($_GET['test'] && strcmp($_GET['test'],'test') == 0)
    echo 'Test word';
    else
    echo '<a href="?test=test" target="_self">Click for test</a>';
    ?>
    And used <iframe str="test.php"> </iframe> in my website but only gave me a white box inside the website, so i went directly to the file instead like www.mywebsite.c om/randomword.php

    Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in randomword.php

    He said i could do it with ajax but well this is what i got to work with
  • Oralloy
    Recognized Expert Contributor
    • Jun 2010
    • 988

    #2
    Ryan,

    It looks like you forgot the parenthesis closing the isset call.

    Code:
    if(isset($_GET['test']) && strcmp($_GET['test'],'test') == 0)
    Luck!
    Oralloy

    Comment

    Working...