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

<body background="i.jpg">

<center>
<h2><b>View Excise Tariff & Duty Master</h2></b>


<?php

$result=mysqli_query($conn,"select distinct record,tariff,commodity,notification,bed,cess,hcess from  excise order by commodity") 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>" . 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>";
if(!isset($row[0])) //test for null value
{
echo "NULL";
}
else
{
?>
<a href = "editview.php?record=<?echo($row[0]);?>"><?echo($row[0]);?></a>
<?

}

for($i=1;$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>
