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

<title>Bank Accounts  Entry</title>

<body bgcolor="#f7f7f9" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="fo()">
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font ><b>Add New Companies</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font >&nbsp;</font>
</td>
</tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590">
<form name="form1" method="post" action="entry.php" onsubmit="return check()">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../global.css">
<script language="javascript">
function check()
{
	
if(form1.compcode.value=="")
	{
		alert("Please enter Company Code");
		form1.compcode.focus();
		return false;
	}	

if(form1.compname.value=="")
	{
		alert("Please enter Company Name");
		form1.compname.focus();
		return false;
	}	
}
</script>

<tr>
      <td>
        <table border="0" cellspacing="1" cellpadding="4" align="center" width="500" bgcolor="#999999">
          <tr align="center"> 
            <td colspan="2"><font face="Arial, Helvetica, sans-serif" size="3" color="#003366"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">New 
              Bank Account </font></b></font></td>
          </tr>
<tr > 
        <td width="139" height="31" align="right" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366">Company Name
          &nbsp;</font></b></font></td><td>

   <SELECT name='compcode' >

<?
    $sBuyQuery = mysql_query("SELECT distinct compcode,name FROM company where brcode ='$brcode' order by name");

    while($row = mysql_fetch_row($sBuyQuery))
    {

            echo "<option value=\"$row[0]\">$row[1]";
        
    }
?>
        </SELECT>
</td></tr>


        <td width="139" height="31" align="right" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366">Bank Name
          &nbsp;</font></b></font></td><td>

<select name=banks>
<?php $query=" select bankcode,bankname from banks order by bankname";
      $query=stripslashes($query);
      $result=mysql_query($query) or
      die( mysql_error() );
      while ( $row= mysql_fetch_row($result))
      {
          echo "<option value='$row[0]'>";
          echo ($row[1]);
	  echo "\n";	  
      }
?>
</select>  
</td></tr>


          <tr> 
            <td align="right" width="326" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366">Account No&nbsp;</font></b></font></td>
            <td width="319" bgcolor="#FFFFFF"> 
              <input type="text" name="accno">
            </td>
          </tr>
          
          <tr> 
            <td colspan="2" bgcolor="#FFFFFF"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr align="center"> 
                  <td> 
                    <input type="submit" name="accept" value="Submit">
                  </td>
                  <td> 
                    <input type="reset" name="reset" value="Clear">
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          

</table>
</table>
<br><br><font size=1><center><a href= "index.html">Return to index page</center></font>
</body>
</html>




