<style>
 td{font-family:verdana;font-size:14;color:black;}
 th{font-family:verdana;font-size:14;color:white;background-color:#5b5858}
 body{background-color:ivory}

 input
  {border-style:ridge;
   border-color:black;
   height:22px;
   width:55;
   border-size=1;
   font-family:verdana;
   font-size:12;
   background-color:white;
   color:black;
  }
</style>
<base target=x>
<table width=100%>
<tr><td></td><td align=right>
<a href='prnitemlist.php'><img src='Type001.gif' border=0 title='Print Items'><br><font size=2 color=red>Print</a></font>
</td></tr>
</table>
<?
include("opendb.php");
$result=mysqli_query($db,"select groupcode,name from groups");
while($row=mysqli_fetch_row($result))
{
?>
<br>
<table border=0 cellspacing=1 cellpadding=1 bgcolor=black width=100%>
<tr bgcolor='#e5e3c9'><td colspan=4>Items Under Group <b><?print $row[1]?></b>
<tr bgcolor='silver'><td width=5><center><b>No.</td><td width=100><center><b>Item Name </td><td><center><b>Description</td> <td width=60><center><b>Action</td></tr>

<?
 $result2=mysqli_query($db,"select * from itemmas where groupcode='$row[0]'") or die(mysqli_error());
 $i=1;
 while($row2=mysqli_fetch_row($result2))
 {
 print"<form action='edititem.php' method=post>";
 print "<input type=hidden name=itemcode value='$row2[0]'>";
 print"<tr bgcolor='#fffcd6' onMouseOver=bgColor='#f7dbd4'; onMouseOut=bgColor='#fffcd6'>";
 print"<td>".$i++."</td><td>$row2[2]</td><td>$row2[3]</td>";
 print "<td align=center><input type=submit value='Edit'></td></tr></form>";
 }
 print"<tr><td colspan=5></tr></td></table>";
}
 print "</tr></td></table> ";
?>
