Parse error: syntax error, unexpected $end in xxx on line 1

Discussion in 'PHP' started by adams95ta, Jan 2, 2008.

  1. #1
    I'm a total amateur when it comes to php I'm trying to integrate my phpbb login and loggout detail into the " Youtube Video Sites Generator In a Box" script. Just by looking at this can you see any errors?

    <?php
    
    error_reporting(0);
    
    define('IN_PHPBB', true);
    
    $phpbb_root_path = './';
    
    include "videoconfig.php";
    
    include($phpbb_root_path . 'extension.inc');
    
    include($phpbb_root_path . 'common.'.$phpEx);
    
    require_once "class.xml.php";
    
    $userdata = session_pagestart($user_ip, PAGE_INDEX);
    
    init_userprefs($userdata);
    
    include($phpbb_root_path . 'includes/page_header.'.$phpEx);
    
    function prepare_and_show($left,$right){
    blah blah blah
    Code (markup):
     
    adams95ta, Jan 2, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post the entire of the code, unexpected $end usually comes about when you are missing a closing }.
     
    nicangeli, Jan 2, 2008 IP
  3. adams95ta

    adams95ta Active Member

    Messages:
    359
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #3
    I can't I'll be posting the entire source for the code i just had to buy.
     
    adams95ta, Jan 2, 2008 IP
  4. adams95ta

    adams95ta Active Member

    Messages:
    359
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #4
    got it fixed you were right missing }
     
    adams95ta, Jan 2, 2008 IP
  5. 812402

    812402 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Same error.

    Code:

    <!DOCTYPE HTML 5>
    <head>
    <title>Register</title>
    </head>
    <body>
    </body>
    </html>
    
    <?php
    
    if(isset($_SESSION['user_id'])) {
    
    $url = 'http://812402.com/812/index.php';
     
    } else {
    
    if(isset($_POST['submitted'])) {
    
    
     if(isset($_POST['username'])) {
    
     } else {
    
     echo '<font color="red"><b>Please enter a username!</b></font color>';
    
     }
    
     if(isset($_POST['password'])) {
    
     } else {
    
     echo '<font color="red"><b>Please enter a password!</b></font color>';
    
     }
    
     if(isset($_POST['password2'])) {
    
      if($_POST['password'] == $_POST['password2']) {
    
      } else {
    
      echo '<font color="red"><b>The two passwords must match!</b></font color>';
    
      }
    
     } else {
    
     echo '<font color="red"><b>Please enter a confirming password!</b></font color>';
    
     }
    
    } else {
    
    echo '<h1>Register</h1>';
    
    };
    
    ?>
    
    
    
    <form action="register.php" method="post" action="register.php">
    
    <p align="center"><input type="text" maxlength="45" name="username" value="username"></p>
    <p align="center"><input type="password" name="password" maxlength="50" value="password"></p>
    <p align="center"><input type="password" name="password2" maxlength="50" value="confirm password"></p>
    <p align="center"><input type="text" name="email" maxlength="50" value="email"></p>
    <input type="hidden" name="submitted" value="TRUE">
    <p align="center"><input type="submit value="Join!">
    
    </form>
    
    Code (markup):
     
    812402, May 26, 2011 IP
  6. mpa360

    mpa360 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This structure is not suitable
    But the current problem is getting lost " } "
     
    mpa360, Jun 10, 2011 IP