<?php include("../../include/dbconnect.php"); ?>
<title> Account Heads edit</title>
<body bgcolor="#ffffff"  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
  <tr> 
    <td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font face="Arial, Helvetica, sans-serif" ><b>Account 
      Group Edit</b></font></td>
  </tr>
  <tr valign="top">
    <td colspan=2> <font face="Arial, Helvetica, sans-serif" >&nbsp;</font> </td>
  </tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590"><form name="form1" method="POST"  action="update.php?<?echo($record);?>">
  <script language="javascript">
	
if(form1.headcode.value=="")
	{
		alert("Please enter Group Code");
		form1.headcode.focus();
		return false;
	}	

if(form1.headname.value=="")
	{
		alert("Please enter Group Name");
		form1.headname.focus();
		return false;
	}	
</script>
  <?php 	

$result=mysqli_query($conn,"select * from acctgroup where record = '$record' ");
$row1=mysqli_fetch_row($result);
?>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Group Code</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text"  readonly="" onKeyPress="return event.keyCode!=13"  size="40" name="acctcode" value = <?php echo($row1[0]);?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Description</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="description" value = <?php echo("'$row1[1]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Appear In</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="appear_in" value = <?php echo("'$row1[2]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Type </b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="type" value = <?php echo("'$row1[3]'");?>>
      </font></td>
  </tr>
  <tr> 
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Group</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="group" value = <?php echo("'$row1[4]'");?>>
      </font></td>
  </tr>
  <input type="hidden" name="record" value="<?echo $record;?>">
  <table cellpading=0 cellspacing=10 width= 50>
    <tr> 
      <td> <blockquote> <input type =submit name=submit value = "Update"></td>
      <td><input type =submit name=submit value = "Delete"></blockquote>
        
  </table>
</table>
<br><br><font size=1><center><a href= "index.html">Return to index page</center></font>
                                                                             
</body>
</form>
