Parse Error! Please help!

Discussion in 'Programming' started by 812402, May 28, 2011.

  1. #1
    ERROR:
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/14/7688814/html/812/index.php on line 20

    CODE:
    <!DOCTYPE HTML 5>
    <html>
    <head>
    <title>Home</title>
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="\812\style.css">
    </head>
    <body>
    
    <h4>Menu</h4>
    <p class="menu"><a href="/812/index.php">Home</a></p>
    </body>
    </html>
    <?php 
    
    if (isset($_SESSION['user_id'])) {
      
      echo '<div class="menu"> <a href="logout.php">Logout</a> <a href="games.php">Games</a></div>';
       
      echo '<h2>Hello, {$_SESSION['username']}</h2>';
    
      echo '<img src="{$_SESSION['thumbnail']}">';
    
      echo '<a href="/812/editavatar.php">Edit Avatar</a>';
        
    } else {
      echo '<div class="menu">
    
      <a href="login.php">Login</a>
      <a href="games.php">Games</a>
      <a href="register.php">Register</a>
      </div>';
      
      echo '<h3><a href="http://812402.com/812/login.php">Click here</a> to login.</h3>';
    };
    
    
    
    ?>
    Code (markup):
     
    812402, May 28, 2011 IP
  2. thejimy

    thejimy Greenhorn

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #2
    Change those two lines:


    to

    and the parse error should be gone.
     
    thejimy, May 29, 2011 IP
  3. 812402

    812402 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you! It works now!
     
    812402, May 29, 2011 IP