Jas.. First of all you don't have the variable $cars assigned.. Second of all, we still don't know what the "test" table looks like? Does it only have one column with all the infos about cars populated in it???
Gurhan -----Original Message----- From: jas [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 12:48 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Parse Error Here is the code from the file that queries the db and pulls the current contents of the db and provides a check box form for each record to delete the items in the db. I dont know if this will help but like I said before any insight would be great. Thanks in advance. Jas <?php require '../scripts/db.php'; $result = mysql_query("SELECT * FROM cur_inv",$dbh) or die("Could not execute query, please try again later"); echo "<table border=\"0\" class=\"table-body\" width=\"100%\"><form name=\"rem_inv\" method=\"post\" action=\"done2.php3\"> <tr><td align=\"center\" colspan=\"3\"><font size=\"4\"><B>Current Inventory</B></font><hr color=\"333333\"></td></tr>"; $count = -1; while ($myrow = mysql_fetch_row($result)) { $count ++; echo "<tr><td width=\"30%\"><B>Type Of Car: </B></td><td>"; printf(mysql_result($result,$count,"car_type")); echo "</td><td><input type=\"checkbox\" name=\"cars\" value=\"checkbox\">remove</td> </tr>\n"; echo "<tr><td width=\"30%\"><B>Model Of Car: </B></td><td>"; printf(mysql_result($result,$count,"car_model")); echo "</td></tr>\n"; echo "<tr><td width=\"30%\"><B>Year Of Car: </B></td><td>"; printf(mysql_result($result,$count,"car_year")); echo "</td></tr>\n"; echo "<tr><td width=\"30%\"><B>Price Of Car: </B></td><td>$"; printf(mysql_result($result,$count,"car_price")); echo "</td></tr>\n"; echo "<tr><td width=\"30%\"><B>VIN Of Car: </B></td><td>"; printf(mysql_result($result,$count,"car_vin")); echo "</td></tr><tr><td colspan=\"3\"><hr color=\"333333\"></td></tr>\n"; } echo "<tr><td><input type=\"submit\" name=\"delete\" value=\"delete\"></td></tr></form></table>"; ?> After this file is pulled and the user selects which record to delete it jumps to the other snippit of code in done2.php3 which is > > $db_name = "test"; > > $table_name = "inventory"; > > $connection = @mysql_connect("localhost", "root", "password") or die > > ("Could > > not connect to database. Please try again later."); > > $db = @mysql_select_db("$db_name",$connection) or die ("Could not select > > database table. Please try again later."); > > $sql = "DELETE FROM $table_name WHERE $cars = > > \"$car_type\",\"$car_model\",\"$car_year\",\"$car_price\",\"$car_vin\",\"$dl > > r_num\""); > > $result = @mysql_query($sql, $connection) or die ("Could not execute > > query. > > > > Any insight would be great... thanks again. > > Jas > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php