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



<center>
<body background="../../images/fibermat.gif">
<h2><b><font face="Arial, Helvetica, sans-serif">View Bank</font></h2></b>

<?

$result=mysqli_query($conn,"select distinct record,bankcode,bankname from banks  group by record order by bankname") or die(mysqli_error());


$number_cols=mysqli_num_fields($result);
echo "<table border=1> \n";
echo "<tr align=center> \n";
for($i=0;$i<$number_cols;$i++)
{
echo "<th><font face='Arial, Helvetica, sans-serif'>" . mysqli_field_name($result,$i).   "</th>\n";
}
echo "<tr>\n";

//layout table

while($row = mysqli_fetch_row($result))
{
echo "<tr align=left> \n";
echo "<td><font face='Arial, Helvetica, sans-serif'>";
if(!isset($row[0])) //test for null value
{
echo "NULL";
}
else
{
?>
<a href = "editview.php?record=<?echo($row[0]);?>"><img src="../../images/b_edit.png"  border="0"></a>
<?

}

for($i=1;$i<$number_cols;$i++)
{
echo "<td><font face='Arial, Helvetica, sans-serif'>";
if(!isset($row[$i])) //test for null value
{
echo "NULL";
}
else
{
echo $row[$i];
}
echo "</td>\n";
}
echo "</tr> \n";
}
echo"</table>";

?>
<input type="hidden" name="fname" value="<?echo $filename;?>">
<form><br><br><font size=1><center><a href= "index.html">Return to index page</center></font>
                                                                             
</body>
