OK I have my data showing up in a table but I have a couple other questions.
1) How do I get the & nbsp inserted so that the fields with no data display better?
2) I want to have a total of two of the columns show at the top of the table (outside of the table)
3) How do I get the dates to show up as mm-dd-yyyy format?
Here is my script:
<html>
<head>
<body background="sky.jpg">
</html>
<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM flightlog WHERE macid='MAC100' ORDER BY date DESC";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Database Output</center></b><br><br>";
?>
<table border="2" cellspacing="2" cellpadding="2">
<tr>
<th><font face="Arial, Helvetica, sans-serif">MACID</font></th>
<th><font face="Arial, Helvetica, sans-serif">Name</font></th>
<th><font face="Arial, Helvetica, sans-serif">Date</font></th>
<th><font face="Arial, Helvetica, sans-serif">Type</font></th>
<th><font face="Arial, Helvetica, sans-serif">Departure</font></th>
<th><font face="Arial, Helvetica, sans-serif">Destination</font></th>
<th><font face="Arial, Helvetica, sans-serif">Time</font></th>
<th><font face="Arial, Helvetica, sans-serif">Charter #</font></th>
<th><font face="Arial, Helvetica, sans-serif">Charter Pay</font></th>
<th><font face="Arial, Helvetica, sans-serif">Comment</font></th>
</tr>
<?
$i=0;
while ($i < $num) {
$macid=mysql_result($result,$i,"macid");
$date=mysql_result($result,$i,"date");
$name=mysql_result($result,$i,"name");
$type=mysql_result($result,$i,"type");
$departure=mysql_result($result,$i,"departure");
$destination=mysql_result($result,$i,"destination");
$hours=mysql_result($result,$i,"hours");
$charterno=mysql_result($result,$i,"charterno");
$charterdoll=mysql_result($result,$i,"charterdoll");
$comment=mysql_result($result,$i,"comment");
?>
<tr>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$macid"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$name"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$date"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$type"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$departure";?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$destination"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$hours"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$charterno"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$charterdoll"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$comment"; ?></font></td>
</tr>
<?
++$i;
}
echo "</table>";
?>
<html>
<a href="http://www.margaritaair.com/index.html">MAIN PAGE</a><br>
<A href="http://www.margaritaair.com/roster.html">ROSTER</a>
You can view the table at http://www.margaritaair.com/flightlog/index.php
Thanks again for all the greeat help!