Parsing Error

From: Date: Wed, 05 Sep 2001 21:08:43 +0000
Subject: Parsing Error
Groups: php.db 
Request: Send a blank email to php-db+get-12183@lists.php.net to get a copy of this message
I keep getting a Parsing Error on line 1 error with the following page. What am I doing wrong? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title>xxx</title> </head> <body> <?php $hostName="xxx"; $userName="xxx"; $password="xxx"; $databaseName="xxx"; $tableName="xxx"; // connnect to the database if (!($link=mysql_pconnect($hostName, $userName, $password))) { DisplayErrMsg(sprintf("error connecting to host %s by user %s", $hostName, $userName)); exit(); } // select the database if (!mysql_select_db($databaseName, $link)) { DisplayErrMsg(sprintf("Error in selecting %s database", $databaseName)); DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link), mysql_error($link))); exit(); } $result=mysql_query("SELECT * FROM listings ORDER BY store, $link"); echo "<TABLE BORDER WIDTH=\"100%%\">\n"; echo "<TR> <TD><B>Store</B></TD> <TD><B>Job Desc</B></TD> <TD><B><Modify/Delete</B></TD> </TR>\n"; while (($row = mysql_fetch_array($result))) { $store=$row["store"]; $jobdesc=$row["jobdesc"]; $rowid=$row["rowid"]; echo "<TR> <TD>$store</TD> <TD>$jobdesc</TD> <TD><A HREF=\"modify.php?rowid=$rowid\"><I>Modify</I></A>/ <A HREF=\"delete.php?rowid=$rowid\"><I>Delete</I></A> </TD> </TR>\n; } echo "</TABLE>"; mysql_free_result($result); ?> <BR><BR> <A HREF="internal.html">Return To Main Menu</A><BR> <A HREF="add.php">Add An Item</A> </body> </html> -- Jeff Grossman (jeff@stikman.com)

« previous php.db (#12183) next »