By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Parse error: syntax error, unexpected '{'

P: 3
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($_SERVER['PHP_SELF'],'login.php'))
and
(!strstr($_SERVER['PHP_SELF'],'create_account.php'))
and
!tep_session_is_registered('customer_id')
) {
?>
<!-- loginbox //-->
<tr>
<td>
<center><TABLE WIDTH=175 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3><center>
<IMG SRC="images/boxes/table_signin.gif"></TD>
</TR>
<TR>
<td>

<?php
if (!tep_session_is_registered('customer_id')) {
?>

<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_LOGIN_BOX);

// new infoBoxHeading($info_box_contents, false, false);

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
. BOX_LOGINBOX_EMAIL
. tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"')
.'<br><br>'
. BOX_LOGINBOX_PASSWORD
. tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
.'<a href="'
. tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
. '">'
. BOX_LOGINBOX_FORGOT_PASSWORD
. '</a>'
. tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)
. '</form><br><br>'
. BOX_LOGINBOX_TEXT_NEW
. '<a href="'
. tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')
. '">'
. BOX_LOGINBOX_NEW
. '</a>'
;

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center',
'text' => $loginboxcontent);
new infoBox($info_box_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('customer_id')) {
?>

<!-- my_account_info //-->
<tr>
<td>
<center><TABLE WIDTH=175 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=3><center>
<IMG SRC="images/boxes/table_myaccount.gif"></TD>
</TR>
<TR>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_HEADING_LOGIN_BOX_MY_ACCOUNT);
// new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' =>
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . LOGIN_BOX_ADDRESS_BOOK . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' . LOGIN_BOX_LOGOFF . '</a>');
new infoBox($info_box_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.
Feb 18 '08 #1
Share this Question
Share on Google+
5 Replies


ronverdonk
Expert 2.5K+
P: 4,258
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
Feb 18 '08 #2

Markus
Expert 5K+
P: 6,050
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!
Feb 18 '08 #3

P: 3
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
Feb 18 '08 #4

P: 3
I'm guessing nobody here can fix it either. Thanks though !!
Feb 18 '08 #5

ronverdonk
Expert 2.5K+
P: 4,258
My IDE does not give an error on braces, so it must be in one of the includes (and their functions).

Ronald
Feb 18 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.