Im new. How do I get the field names to show in my php mySQL search?

I can get the rows to display, I can make it only show certain rows but I can't figure out how to get the field names to display at the top of the columns so that when a user scrolls down, the field names stay there. I know I have to do some sort of header but can't figure out how and I've searched for hours for the answer with no luck. I'm also trying to figure out, instead of showing rows 738-830, I'd like to show the most recent 100 rows. any help or direction is greatly appreciated.

<?php
$database="mydb";
mysql_connect ("localhost", "username", "password");
@mysql_select_db($database) or die( "Unable to select database");
$result = mysql_query( "SELECT Lender, `1st Loan Amount`, FirstLoanProgram, FirstLoanType, InterestRate1, LTV1, CLTV1, `2nd Loan Amount`, SecondLoanProgram, SecondLoanType, InterestRate2, LTV2, CLTV2, Amort_type, Loan_Category, Combo, Property_type, Units, Occupancy, B_Fico_1, B_Fico_2, B_Fico_3, C_Fico_1, C_Fico_2, C_Fico_3, BK, Foreclosure, 12mth_lates, 24mth_lates, Num_trades, 1st_time_homebuyer, Doctype
FROM transactions LIMIT 738, 830" )
or die("SELECT Error: ".mysql_error());
$num_rows = mysql_num_rows($result);
print "There are $num_rows records.<P>";
print "<table width=200 border=1>\n";
while ($get_info = mysql_fetch_row($result)){print "<tr>\n";
foreach ($get_info as $field)
print "\t<td><font face=arial size=1/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
?>
[1608 byte] By [trustedruss] at [2007-11-20 11:19:45]
# 1 Re: Im new. How do I get the field names to show in my php mySQL search?
If you want to keep the column names at the top while the data scrolls, you will have to use CSS, not PHP to accomplish that. Research "position: fixed" styles using CSS. Google is a great resource.
PeejAvery at 2007-11-10 3:56:07 >