<?php include("../../include/dbconnect.php");?>

<body bgcolor="#ffffff"  topmargin=0>
<center>
<h2><b>Banks</h2></b>

<?php
$result=mysql_query("select * from banks order by  bankcode") or
die(mysql_error());

$number_cols=mysql_num_fields($result);
echo "<table border=1 width=100>\n";
echo "<tr align=center> \n";
for($i=0;$i<$number_cols;$i++)
{
echo "<th>" . mysql_field_name($result,$i).   "</th>\n";
}
echo "<tr>\n";

//layout table

while($row = mysql_fetch_row($result))
{
echo "<tr align=left> \n";

for($i=0;$i<$number_cols;$i++)
{
echo "<td>";
if(!isset($row[$i])) //test for null value
{
echo "NULL";
}
else
{
echo $row[$i];
}
echo "</td>\n";
}
echo "</tr> \n";
}
echo"</table>";
?>

<form><br><br><font size=1><center><a href="index.html">Return to Index page</center></font>
</body>

