<? session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
 if($upd)
 {
   $sql="update itemmaster set itname='$itname' where code='$code' and brcode='$brcode'";
   mysqli_query($db,$sql) or die(mysqli_error());
   include("itemmaster.php");
   return;
 }

$re=mysqli_query($db,"select * from itemmaster where code='$code' and brcode='$brcode'") or die(mysqli_error());
$row=mysqli_fetch_array($re);
?>
<style>
body,td{font-family:'arial narrow';letter-spacing:1;}
tr{background-color:c1d7bb}
.mnu{margin-left:5}
</style>
<body bgcolor='ivory'>

<CENTER>
<BR>
<FORM ACTION='<?print $PHP_SELF?>' METHOD='POST'>
<input type=hidden name='code' value='<?print $code?>'>
<table cellspacing=1 cellpadding=1 bgcolor=green>
 <tr><td align=center>
  <table>
    <tr><td colspan=2 align=center BGCOLOR='BROWN'><FONT COLOR='IVORY'><B>ITEM MASTER</TD></TR>
    <tr><td>Item Name </td><td>
      <input type=text name='itname' size=40 value='<?print $row[itname]?>'></td></tr>
    <tr><td colspan=2 align=center><input type=submit name='upd' value='UPDATE'>
    <input type=button value='CANCEL' onClick=document.location='../blank.html'></td></tr>
  </table>
 </td></tr>
</table>

<br>
