RE: [PHP] Unexplained Parse Error
| From: | Ben Meyer | Date: | Wed, 16 Aug 2000 19:29:06 +0000 |
| Subject: | RE: [PHP] Unexplained Parse Error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12104@lists.php.net to get a copy of this message | ||
> Kindly paste lines 100-125 please?
>
Sorry about that, I didn't know the listserv would drop the file. I pasted
lines 57 to 125 b/c of how the it is layed out. This covers the entire MySql
session. Line 117 is the line right after the MYSQL_Close_Connection()
statement. (Line 100 was in the middle of the echo statement for the form.)
Thanks,
Benjamen Meyer
> On Wed, 16 Aug 2000, Ben Meyer wrote:
> > I am getting a parse error on one of my pages that I cannot explain.
> Several
> > times I have looked over the page line by line to find some minute
> detail
> > that could be causing it. The page is attached. Here's the error:
> >
> > Parse error: parse error in UserData.php4 on line 117.
> >
> > I have also checked the pages that are required into the file for
> problems
> > but have come up empty there as well.
> >
> > Thanks in advance for the help,
>
MYSQL_Connect_To_Database($ValidUser,$ValidPassword); //Line
57
$SqlQuery = "SELECT FirstName, MiddleName, LastName,"
. " Department, PhoneExtension, Email,"
. " ShortFirstName"
. " FROM Emp"
. " WHERE E = \"$EID\"";
$SqlQuery2 = "SELECT LicensePlate, Color,Make,Model"
. " FROM Cars"
. " WHERE EID = \"$EID\"";
if (!($Result = mysql_query($SqlQuery)))
{
$Err = "<STRONG>Sql Statement gave error: " . mysql_error()
. "</STRONG>; Could not get employee information.";
echo $Err;
}
if (list($First,$Middle,$Last,$Dept,$Ext,$Email,$SFirst)
= mysql_fetch_row($Result))
{
$MY_SESSION_NAME=session_name();
$MY_SESSION_ID=session_id();
echo "
<FORM ACTION=\"$ThisPageName?$MY_SESSION_NAME=$MY_SESSION_ID\"
METHOD=\"post\">
<TABLE BORDER=0>
<TR><TH COLSPAN=3> Welcome $First $Last </TH></TR>
<TR><TD> Full First Name </TD><TD> Middle Name </TD><TD> Last
Name
</TD></TR>
<TR>
<TD><INPUT TYPE=\"text\" NAME=\"FirstName\"
MAXLENGTH=\"15\"
SIZE=\"15\" VALUE=\"$First\"></TD>
<TD><INPUT TYPE=\"text\" NAME=\"MiddleName\"
MAXLENGTH=\"20\"
SIZE=\"20\" VALUE=\"$Middle\"></TD>
<TD><INPUT TYPE=\"text\" NAME=\"LastName\"
MAXLENGTH=\"30\"
SIZE=\"30\" VALUE=\"$Last\"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT> NickName: </TD>
<TD COLSPAN=2><INPUT TYPE=\"text\" NAME=\"ShortFirstName\"
MAXLENGTH=\"10\" SIZE=\"10\" VALUE=\"$SFirst\"></TD>
</TR>
<TR>
<TD ALIGN=RIGHT>* Network Logon<BR>Name: </TD>
<TD COLSPAN=2><INPUT TYPE=\"text\" NAME=\"NTAU\"
MAXLENGTH=\"16\"
SIZE=\"16\" VALUE=\"$NTAU\"></TD>
</TR>
<TR><TD COLSPAN=3><BR></TD></TR>
<TR>
<TD>* Department </TD>
<TD>* Phone Ext. </TD>
<TD>* E-mail Address</TD>
</TR>
<TR>
<TD><INPUT TYPE=\"text\" NAME=\"Department\"
MAXLENGTH=\"15\"
SIZE=\"15\" VALUE=\"$Dept\"></TD>
<TD><INPUT TYPE=\"text\" NAME=\"PhoneExt\"
MAXLENGTH=\"11\"
SIZE=\"11\" VALUE=\"$Ext\"></TD>
<TD><INPUT TYPE=\"text\" NAME=\"Email\" MAXLENGTH=\"50\"
SIZE=\"20\" VALUE=\"$Email\"></TD>
</TR>
<TR><TD COLSPAN=3 ALIGN=RIGHT>
<INPUT TYPE=\"submit\" NAME=\"UpdateUserProfile\" VALUE=\"Update
Profile\">
</TD></TR>
</TABLE>
</FORM>";
}
else
{
echo "<STRONG> User Not Found.</STRONG> Contact your system
administrator.";
}
MYSQL_Close_Connection();
} //Line 117
$MY_SESSION_NAME=session_name();
$MY_SESSION_ID=session_id();
echo "
<FORM ACTION=\"$ThisPageName?$MY_SESSION_NAME=$MY_SESSION_ID\"
METHOD=\"post\">
<INPUT TYPE=\"submit\" VALUE=\"Sign Out\">
</FORM>";
</SCRIPT>
</HTML> <!-- End of File -->