<a href="controlpanel.html"><strong>BACK TO DASHBOARD</strong></a>
<p><br></p>
<?php  
include_once('connect.php');

		$sql="SELECT * FROM customers ORDER BY DATE DESC";
		$result =mysqli_query($con, $sql);
while($row=mysqli_fetch_array($result)){

$name= $row['name'];
$address= $row['address'];
$phone= $row['phone'];
$acctno= $row['account_no'];
$acctype= $row['account_type'];
$username= $row['username'];
$password= $row['password'];

$sqm =mysqli_query($con, "SELECT * FROM transactions WHERE username='$username' ORDER BY DATE DESC");
$rw=mysqli_fetch_array($sqm);
$credit=$rw['credit'];
$debit=$rw['debit'];
$date=$rw['date'];

$info= 
'<style type="text/css">

.style1 {
	color: #0000FF;
	font-weight: bold;
	font-size: 15px;

}
.style2 {
	font-family: "Courier New", Courier, mono;
	font-style: italic;
	font-size: 12px;
}
</style><table width="auto" border="1" bgcolor="white">
  <tr>
    <td>	
	<span class="style1">Username:</span><span class="style2"> '.$username.'</span><BR>
        <span class="style1">Password:</span><span class="style2"> '.$password.'</span><BR>
	|<span class="style1">Name:</span><span class="style2"> '.$name.'</span><BR>
	|<span class="style1">Bank Account Number:</span>	<span class="style2">'.$acctno.'</span><BR>
	|<span class="style1">Phone:</span><span class="style2">	'.$phone.'</span><BR>
	|<span class="style1">Acct Type:</span><span class="style2">	'.$acctype.'</span><BR>
	|<span class="style1"><a href="addtransaction.php?user='.$username.'">CLICK HERE TO ADD TRANSACTION</a></span><BR>
		|<span class="style1"><a href=update.php?user='.$username.'>UPDATE USER RECORD</button></a></span></br>

	|<span class="style1"><a href=delete.php?delete='.$username.'>Delete User</button></a></span></br>

  </tr>
</table>';

		echo $info;
		}
        ?>