The </table> is in the loop. Place it outside & you'll be OK.

Miles Thompson

At 01:35 AM 2/15/2002 -0700, jas wrote:
>I am having a little problem formating data retrieved from a database into
>table cells... So far after connecting and querying the database table the
>data is put into table cells, however after the first entry is displayed in
>the table all the other entries loose the formating, HELP?
>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=\"newhead\" width=\"100%\"><tr><td
>align=\"center\" colspan=\"2\"><B>Current Inventory</B><hr
>$count = -1;
>while ($myrow = mysql_fetch_row($result)) {
>$count ++;
>echo "<tr><td width=\"30%\"><B>Type Of Car: </B></td><td>";
>echo "</td></tr>\n";
>echo "<tr><td width=\"30%\"><B>Model Of Car: </B></td><td>";
>echo "</td></tr>\n";
>echo "<tr><td width=\"30%\"><B>Year Of Car: </B></td><td>";
>echo "</td></tr>\n";
>echo "<tr><td width=\"30%\"><B>Price Of Car: </B></td><td>$";
>echo "</td></tr>\n";
>echo "<tr><td width=\"30%\"><B>VIN Of Car: </B></td><td>";
>echo "</td></tr><tr><td colspan=\"2\"><hr
>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

Reply via email to