help with a parse error

From: Date: Thu, 29 Mar 2001 03:22:05 +0000
Subject: help with a parse error
Groups: php.db 
Request: Send a blank email to php-db+get-7955@lists.php.net to get a copy of this message
hi I just subsribed to this list with the hope you can help me. I am working on this code and I get a parse error in line 52 which is ... I been going through it over and over and can't find a glue. Has anyone out there a solution for me please? I am a beginner in PHP and like to hear about anything I need to know. Kindest Regards Petra petra@aus.sh <? else: // Connect to the database server $dbcnx = @mysql_connect("localhost", "root", ""); if (!$dbcnx) { echo( "<P>Unable to connect to the " . "database server at this time.</P>" ); exit(); } //Select the products database if (! @mysql_select_db("JShistbau") ) { echo ( "<P>Unable to locate the Product " . "database at this time.</P>" ); exit(); } // If a Product has been submitted, // add it to the database. if ("SUBMIT" == $submitproduct) { $sql = "INSERT INTO JShistbau SET " . "cdescription='$productdescription', " . "cdateavailable=CURDATE()"; if (mysql_query($sql)) { echo("<P>Your Product has been added.</P>"); } else { echo("<P>Error adding submitted product: " . mysql_error(). "</P>"); } } echo("<P> Here are all the products in our database: </P>:); // Request the text of all the products $result = mysql_query( "select * from products"); !!!!!this is line 52!!!!!! if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } // Display the text of each product in a paragraph while ( $row = mysql_fetch_array($result) ) { echo("<P>" . $row["cdescription"] . "</P>"); } //When clicked, this link will load this page //with the product submission form displayed. echo("<P><AHREF='$PHP_SELF?addproduct=1'>" . "Add a Product!</A></P>"); end if; ?> </BODY> </HTML>

« previous php.db (#7955) next »