<?php
include_once("connect.php");
$ID=$_POST['ID'];

$sql= "SELECT * FROM member WHERE id=$ID";
$result3 =mysqli_query($con, $sql);
$row3 = mysqli_fetch_array($result3);
$name=$row3['name'];
$address=$row3['address'];
$acctypr=$row3['acctypr'];
$serial=$row3['serial'];
$currency=$row3['currency'];
$acctnum=$row3['acctnum'];
$comments=$row3['comments'];
$date1=$row3['date1'];
$date2=$row3['date2'];
$date3=$row3['date3'];
$date4=$row3['date4'];
$date5=$row3['date5'];
$ref1=$row3['ref1'];
$ref2=$row3['ref2'];
$ref3=$row3['ref3'];
$ref4=$row3['ref4'];
$ref5=$row3['ref5'];
$credit1=$row3['credit1'];
$credit2=$row3['credit2'];
$credit3=$row3['credit3'];
$credit4=$row3['credit4'];
$credit5=$row3['credit5'];
$debit1=$row3['debit1'];
$debit2=$row3['debit2'];
$debit3=$row3['debit3'];
$debit4=$row3['debit4'];
$debit5=$row3['debit5'];
$total1=$row3['total1'];
$total2=$row3['total2'];
$total3=$row3['total3'];
$total4=$row3['total4'];
$total5=$row3['total5'];
$total=$row3['total'];
$officer=$row3['officer'];
$user=$row3['user'];
$pass=$row3['pass'];
?>
<form id="form2" name="form2" method="post" action="update.php">
  <p align="center">ID
    <input name="ID" type="text" id="ID" value="<?php echo $ID; ?>" />
  </p>
  <table width="73%" border="0" align="center">
    <tbody>
      <tr>
        <td colspan="5"><font color="#336666" size="2"><b><font face="Verdana">Online Statement of Accounts</font></b></font></td>
      </tr>
      <tr>
        <td width="18%" bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>Account 
          Name:</strong></font></td>
        <td width="38%"><input name="name" type="text" id="name" value="<?php echo $name; ?>" /></td>
        <td colspan="2" bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>Account 
          Officer:</strong></font></td>
        <td width="28%"><input name="officer" type="text" id="officer" value="<?php echo $officer; ?>" /></td>
      </tr>
      <tr>
        <td bgcolor="#336666"><font face="Verdana" size="2" color="#FFFFFF"><strong>Holder's 
          Address:</strong></font></td>
        <td><textarea name="address" cols="40" id="address"><?php echo $address; ?></textarea></td>
        <td width="16%" bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>Account 
          Number:</strong></font></td>
        <td colspan="2"><input name="acctnum" type="text" id="acctnum" value="<?php echo $acctnum; ?>" size="50" /></td>
      </tr>
      <tr>
        <td bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>Account 
          Type:</strong></font></td>
        <td><input name="acctypr" type="text" id="acctypr" value="<?php echo $acctypr; ?>" /></td>
        <td colspan="2" bgcolor="#336666"><strong><font color="#FFFFFF">Username</font></strong></td>
        <td><input name="user" type="text" id="user" value="<?php echo $user; ?>" /></td>
      </tr>
      <tr>
        <td bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>SID 
          Serial:</strong></font></td>
        <td><font face="Verdana" size="2" color="#336666">
          <input name="serial" type="text" id="serial" value="<?php echo $serial; ?>" />
        </font></td>
        <td colspan="2" bgcolor="#336666"><strong><font color="#FFFFFF">Password</font></strong></td>
        <td><input name="pass" type="text" id="pass" value="<?php echo $pass; ?>" /></td>
      </tr>
      <tr>
        <td bgcolor="#336666"><font size="2" face="Verdana" color="#FFFFFF"><strong>Currency:</strong></font></td>
        <td><font face="Verdana" size="2" color="#336666">
          <input name="currency" type="text" id="currency" value="<?php echo $currency; ?>" />
        </font></td>
        <td colspan="2" bgcolor="#336666"><strong><font color="#FFFFFF">Comments</font></strong></td>
        <td><input name="comments" type="text" id="comments" value="<?php echo $comments; ?>" /></td>
      </tr>
    </tbody>
  </table>
  <table width="96%" height="184" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="2" bgcolor="#eeeeee">
    <tbody>
      <tr>
        <td width="16%" bgcolor="#336666"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Date</strong></font></div></td>
        <td width="36%" bgcolor="#336666"><div align="center"><font color="#FFFFFF">Ref</font></div></td>
        <td width="16%" bgcolor="#336666"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Credit</strong></font></div></td>
        <td width="16%" bgcolor="#336666"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Debit</strong></font></div></td>
        <td width="16%" bgcolor="#336666"><div align="center"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Total</strong></font></div></td>
      </tr>
      <tr>
        <td bgcolor="#999999"><label>
          <input name="date1" type="text" id="date1" value="<?php echo $date1; ?>" />
        </label></td>
        <td bgcolor="#999999"><div align="center"><font color="#000000">
            <input name="ref1" type="text" id="ref1" value="<?php echo $ref1; ?>" size="50" />
        </font></div></td>
        <td bgcolor="#999999"><div align="center">
            <input name="credit1" type="text" id="credit1" value="<?php echo $credit1; ?>" />
        </div></td>
        <td bgcolor="#666666"><input name="debit1" type="text" id="debit1" value="<?php echo $debit1; ?>" /></td>
        <td bgcolor="#666666"><input name="total1" type="text" id="total1" value="<?php echo $total1; ?>" /></td>
      </tr>
      <tr>
        <td bgcolor="#999999"><input name="date2" type="text" id="date2" value="<?php echo $date2; ?>" />
        </td>
        <td bgcolor="#999999"><div align="center">
            <p><font color="#000000">
              <input name="ref2" type="text" id="ref2" value="<?php echo $ref2; ?>" size="50" />
            </font></p>
        </div></td>
        <td bgcolor="#999999"><div align="center">
            <input name="credit2" type="text" id="credit2" value="<?php echo $credit2; ?>" />
        </div></td>
        <td bgcolor="#666666"><input name="debit2" type="text" id="debit2" value="<?php echo $debit2; ?>" /></td>
        <td bgcolor="#666666"><input name="total2" type="text" id="total2" value="<?php echo $total2; ?>" /></td>
      </tr>
      <tr>
        <td height="19" bgcolor="#999999"><input name="date3" type="text" id="date3" value="<?php echo $date3; ?>" /></td>
        <td bgcolor="#999999"><div align="center"><font color="#000000">
            <input name="ref3" type="text" id="ref3" value="<?php echo $ref3; ?>" size="50" />
        </font></div></td>
        <td bgcolor="#999999"><div align="center">
            <input name="credit3" type="text" id="credit3" value="<?php echo $credit3; ?>" />
        </div></td>
        <td bgcolor="#666666"><input name="debit3" type="text" id="debit3" value="<?php echo $debit3; ?>" /></td>
        <td bgcolor="#666666"><input name="total3" type="text" id="total3" value="<?php echo $total3; ?>" /></td>
      </tr>
      <tr>
        <td height="20" bgcolor="#999999"><font color="#336666" face="Verdana, Arial, Helvetica, sans-serif"><font size="2"></font></font>
            <input name="date4" type="text" id="date4" /></td>
        <td bgcolor="#999999"><div align="center"> <font color="#000000">
            <input name="ref4" type="text" id="ref4" size="50" />
        </font></div></td>
        <td bgcolor="#999999"><div align="center">
          <input name="credit4" type="text" id="credit4" />
        </div></td>
        <td bgcolor="#666666"><input name="debit4" type="text" id="debit4" /></td>
        <td bgcolor="#666666"><input name="total4" type="text" id="total4" /></td>
      </tr>
      <tr>
        <td height="20" bgcolor="#999999"><input name="date5" type="text" id="date5" />
            <div align="center"><font color="#336666" size="2" face="Verdana, Arial, Helvetica, sans-serif"></font></div></td>
        <td height="20" bgcolor="#999999"><div align="center"><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif">
            <input name="ref5" type="text" id="ref5" size="50" />
        </font></div></td>
        <td height="20" bgcolor="#999999"><div align="center">
            <input name="credit5" type="text" id="credit5" />
        </div></td>
        <td height="20" bgcolor="#666666"><input name="debit5" type="text" id="debit5" /></td>
        <td height="20" bgcolor="#666666"><input name="total5" type="text" id="total5" /></td>
      </tr>
      <tr bgcolor="#999999">
        <td height="20" colspan="5"><font color="#336666" size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
      </tr>
    </tbody>
  </table>
  <table width="72%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td width="40%" bgcolor="#336666"><div align="right"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong> CURRENT BALANCE</strong></font> </div></td>
        <td width="2%"><font color="#336666" size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
        <td bgcolor="#eeeeee"><div align="left">
            <p><strong><font color="#FF0000">$</font></strong>
                <input name="total" type="text" id="total" value="<?php echo $total; ?>" />
            </p>
        </div>
            <div align="center"></div></td>
      </tr>
    </tbody>
  </table>
  <p align="center">
    <input type="submit" name="Submit" value="Submit">
  </p>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
