help with php statment please

Discussion in 'Programming' started by callisto11, Dec 12, 2007.

  1. #1
    :)
    IM TRYING TO GET THIS PART OF MY SCRIPT TO WORK AND IT KEEPS COMING WITH ERRORS AND ASKING FOR THINGS I DONT UNDERSTAND:

    (HERES THE STATMENT GOES IN homepage.php)

    <?php
    if (isset ($_SESSION['email']))
    {
    echo <a href="logout.php"> LOGOUT</a>';
    }
    else if
    {
    echo '<a href="customerlogin.php"> SIGN UP/SIGN-IN</a>';
    }

    ?>

    error message: Parse error: syntax error,unexpected '<'
     
    callisto11, Dec 12, 2007 IP
  2. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You are missing a quote sign '
    Replace:
    
    echo <a href="logout.php"> LOGOUT</a>';
    
    Code (markup):
    with
    
    echo '<a href="logout.php"> LOGOUT</a>';
    
    Code (markup):
     
    hogan_h, Dec 12, 2007 IP
  3. callisto11

    callisto11 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you, its working now, my little mistake!
     
    callisto11, Dec 12, 2007 IP