Parse error: syntax error, unexpected '{'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joshr35
    New Member
    • Feb 2008
    • 3

    Parse error: syntax error, unexpected '{'

    I keep getting this same error on my store front page login area.

    Parse error: syntax error, unexpected '{'

    Here's the actuall php script:
    [php]
    <?php
    if ( (!strstr($_SERV ER['PHP_SELF'],'login.php'))
    and
    (!strstr($_SERV ER['PHP_SELF'],'create_accoun t.php'))
    and
    !tep_session_is _registered('cu stomer_id')
    ) {
    ?>
    <!-- loginbox //-->
    <tr>
    <td>
    <center><TABL E WIDTH=175 BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD COLSPAN=3><cent er>
    <IMG SRC="images/boxes/table_signin.gi f"></TD>
    </TR>
    <TR>
    <td>

    <?php
    if (!tep_session_i s_registered('c ustomer_id')) {
    ?>

    <?php
    $info_box_conte nts = array();
    $info_box_conte nts[] = array('text' => BOX_HEADING_LOG IN_BOX);

    // new infoBoxHeading( $info_box_conte nts, false, false);

    $loginboxconten t = tep_draw_form(' login', tep_href_link(F ILENAME_LOGIN, 'action=process ', 'SSL'))
    . BOX_LOGINBOX_EM AIL
    . tep_draw_input_ field('email_ad dress', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"')
    .'<br><br>'
    . BOX_LOGINBOX_PA SSWORD
    . tep_draw_passwo rd_field('passw ord', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
    .'<a href="'
    . tep_href_link(F ILENAME_PASSWOR D_FORGOTTEN, '', 'SSL')
    . '">'
    . BOX_LOGINBOX_FO RGOT_PASSWORD
    . '</a>'
    . tep_image_submi t('button_login .gif', IMAGE_BUTTON_LO GIN)
    . '</form><br><br>'
    . BOX_LOGINBOX_TE XT_NEW
    . '<a href="'
    . tep_href_link(F ILENAME_CREATE_ ACCOUNT, '', 'SSL')
    . '">'
    . BOX_LOGINBOX_NE W
    . '</a>'
    ;

    $info_box_conte nts = array();
    $info_box_conte nts[] = array('align' => 'center',
    'text' => $loginboxconten t);
    new infoBox($info_b ox_contents);
    ?>
    </TD>
    </TR>
    <TR>
    <TD COLSPAN=3>
    </TD>
    </TR>
    </TABLE>
    </td>
    </tr>
    <?php
    } else {
    // If you want to display anything when the user IS logged in, put it
    // in here... Possibly a "You are logged in as :" box or something.
    }
    ?>
    <!-- loginbox_eof //-->
    <?php
    // WebMakers.com Added: My Account Info Box
    } else {
    if (tep_session_is _registered('cu stomer_id')) {
    ?>

    <!-- my_account_info //-->
    <tr>
    <td>
    <center><TABL E WIDTH=175 BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <TR>
    <TD COLSPAN=3><cent er>
    <IMG SRC="images/boxes/table_myaccount .gif"></TD>
    </TR>
    <TR>
    <td>
    <?php
    $info_box_conte nts = array();
    $info_box_conte nts[] = array('align' => 'left',
    'text' => BOX_HEADING_LOG IN_BOX_MY_ACCOU NT);
    // new infoBoxHeading( $info_box_conte nts, false, false);

    $info_box_conte nts = array();
    $info_box_conte nts[] = array('align' => 'left',
    'text' =>
    '<a href="' . tep_href_link(F ILENAME_ACCOUNT , '', 'SSL') . '">' . LOGIN_BOX_MY_AC COUNT . '</a><br>' .
    '<a href="' . tep_href_link(F ILENAME_ACCOUNT _EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOU NT_EDIT . '</a><br>' .
    '<a href="' . tep_href_link(F ILENAME_ACCOUNT _HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOU NT_HISTORY . '</a><br>' .
    '<a href="' . tep_href_link(F ILENAME_ADDRESS _BOOK, '', 'SSL') . '">' . LOGIN_BOX_ADDRE SS_BOOK . '</a><br>' .
    '<a href="' . tep_href_link(F ILENAME_ACCOUNT _NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODU CT_NOTIFICATION S . '</a><br>' .
    '<a href="' . tep_href_link(F ILENAME_LOGOFF, '', 'NONSSL') . '">' . LOGIN_BOX_LOGOF F . '</a>');
    new infoBox($info_b ox_contents);
    ?>
    </TD>
    </TR>
    <TR>
    <TD COLSPAN=3>
    </TD>
    </TR>
    </TABLE>
    </td>
    </tr>
    <!-- my_account_info _eof //-->

    <?php
    }}

    ?>[/php]
    Can anyone please help me here.

    Thank you,

    Josh R.
    Last edited by ronverdonk; Feb 18 '08, 08:23 PM. Reason: code within code tags
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    I am really not tempted to read that mess of code.

    Before you do anything, read the Posting Guidelines about enclosing code within the appropriate code tags!

    Our members are volunteers and should be treated with a bit of courtesy.

    moderator

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      When you get that error, you are also give a line number and also the character which PHP expects..
      Provide the full error.
      -_-
      and, as ron said, use code tags!

      Comment

      • Joshr35
        New Member
        • Feb 2008
        • 3

        #4
        Ok, sorry about the code tags.

        The php error is in line one. But this does me no good because when I edit the code on the server, the entire code is on line 1.

        Here's the whole error message.

        Parse error: syntax error, unexpected '{' in /home/jbminima/public_html/furniture/includes/boxes/Login_Box.php on line 1

        Comment

        • Joshr35
          New Member
          • Feb 2008
          • 3

          #5
          I'm guessing nobody here can fix it either. Thanks though !!

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            My IDE does not give an error on braces, so it must be in one of the includes (and their functions).

            Ronald

            Comment

            Working...