<?php 

require_once("config/configDB.php"); 

$id  =  $_GET['id'];

$sql = mysqli_query($conn,"SELECT * FROM user_login WHERE id='$id' ");
 
$row=mysqli_fetch_array($sql,MYSQLI_ASSOC);

//cname, address1, address2, customer_state, city, area, country, pincode, mobile, phone1, phone2, email, aemail, gstin, other_ref, gst_type, discount_per,ccode, open_balance

$username   = $row['username'];
$pwd   = $row['password'];

?>
<!DOCTYPE html>
<html>
<head>
    <title>User's Master</title>
    <?php require 'header.php' ?>
    

</head>
<body>
    <?php require 'menu.php' ?>
<div class="container-fluid">
    <form class="form-horizontal" action="usersMasterUpdate.php" method="post">
    <div class="form-group">
      <label class="control-label col-sm-2" for="email">Edit user</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="Enter Customer Name"  value ="<?php echo $username; ?>" name="username">
        <input type="hidden" value='<?php echo $id; ?>' name="edit_id">

      </div>
      
    </div>
    
    <div class="form-group">
      <label class="control-label col-sm-2" for="email">Edit Password</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="Enter Customer Name"  value ="<?php echo $pwd; ?>" name="pwd">
        

      </div>
      
    </div>
    
    
    <div class="form-group">        
      <div class="col-sm-12 text-center">
        <button type="submit" class="btn btn-default">Update</button>
      </div>
    </div>
  </form>   
</div>

</body>
</html>