<?php
include('security.php');

include('includes/header.php');
include('includes/navbar.php');
?>

<div class="container-fluid">

<!-- DataTales Example -->
<div class="card shadow mb-4">
    <div class="card-header py-3">
        <h6 class="m-0 font-weight-bold text-primary"> EDIT Admin Profile </h6>
    </div>
    <div class="card-body">
<?php 

$connection = mysqli_connect("localhost","root","","broker");
        
    if(isset($_POST['edit_btn']))   
{
    $id = $_POST['edit_id'];
    
    $query = "SELECT * FROM users WHERE id='$id' ";
    $query_run = mysqli_query($connection, $query);   
    
    foreach($query_run as $row)
    {
        ?>
        
        <form action="code.php"method="POST">
        
        <input type="hidden" name="edit_id"  value="<?php echo $row['id'] ?>">
        
        <div class="form-group">
                   
                    <label>Trasaction ID</label>
                        <input type="text" name="edit_trans" value="" class="form-control" > 
                    </div>
                    
                <div class="form-group">
                    <label>Date and Time</label>
                        <input type="text" name="edit_date" value="" class="form-control" > 
                    </div>
                
        <div class="form-group">
            <label>Amount Deposited</label>
                <input type="text" name="edit_amount" class="form-control" 
                value=""
                   >
                    </div>
                
            
                <div class="form-group">
                    <label>Status</label>
                        <input type="text" name="edit_status"  class="form-control" >
                    </div>
        <a href="register.php" class="btn btn-danger" >CANCEL</a>
        <button  type="submit" name="deposit_historytbtn"class="btn btn-primary">Update</button>
        
        </form>
        
        <?php
    }
}
?>
                
    </div>     
    </div>
</div>    

</div>
<!-- /.container-fluid -->


<?php
include('includes/scripts.php');
include('includes/footer.php');
?>