formating problem

From: Date: Tue, 19 Feb 2002 11:12:55 +0000
Subject: formating problem
Groups: php.db 
Request: Send a blank email to php-db+get-17073@lists.php.net to get a copy of this message
I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... 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=\"2\"><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=\"car_type\" 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 "<input type=\"submit\" name=\"delete\" value=\"delete\"></form></table>"; ?>

« previous php.db (#17073) next »