(YET ANOTHER) Parse Error!

Discussion in 'PHP' started by 812402, May 29, 2011.

  1. #1
    I know I keep posting parse error complaints, but I'm a beginner with php.

    Error:
    Parse error: syntax error, unexpected '}' in /home/content/14/7688814/html/812/register.php on line 28

    This is about were the problem was. The } else { is line 28.

    
    
     if (isset($_POST['username'])) {
    
    $un = 'escape_data ($_POST[username])' 
    
     } else {
    
     echo '<p align="center"><font color="red"><b>Please enter a username!</b></font color></p>';
    
     }
    
    
    Code (markup):
    Thanks for helping in earlier threads!
     
    812402, May 29, 2011 IP
  2. dazst

    dazst Active Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Change:
    
    $un = 'escape_data ($_POST[username])' 
    
    Code (markup):
    to
    
    $un = escape_data ($_POST[username]); 
    
    Code (markup):
     
    dazst, May 29, 2011 IP
  3. 812402

    812402 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is the second time you've helped today! Thanks for everything!
     
    812402, May 29, 2011 IP