<?php
session_start(); 
$u_uname = '';
if (isset($_COOKIE['auth_token'])) {
    $u_uname = $_COOKIE['auth_token'];
} else {
    header("location:login.php");
    exit; 
}
 $id= $_GET['id'];
?>

<?php include 'include/header.php'; ?>
<?php include 'include/aside.php'; ?>
<?php include 'include/connection.php'; ?>



<div class="page-wrapper">
			<div class="page-content">
                       <div class="row">
                    <div class="col-lg-12 mx-auto">
                        
                                                
						<div class="card">
							<div class="card-header px-4 py-3">
								<h5 class="mb-0">Edit</h5>
							</div>
							<div class="card-body p-4">
								<form id="jQueryValidationForm" method="POST" action="action/edit_user.php?id=<?php echo $id; ?>" novalidate="novalidate">
								
								    <!--<div class="row mb-3">-->
								    <!--    <label for="input35" class="col-sm-3 col-form-label">Server Name</label>-->
								    <!--    <div class="col-sm-9">-->
            <!--                                <select class="form-select mb-3" aria-label="Default select example" name="clientId" required="">-->
            <!--                                <option selected="">Select Client</option>-->
                                    
            <!--                                <option value="CSH724028">Amarjit Aps web</option><option value="CSH951443">anu rtfr</option><option value="CSH702416">pallavi CodeStudioHub Private Limited</option><option value="CSH504459">simran1 abcd</option><option value="CSH969951">Arul Raj Arul Raj</option>                                        </select>-->
            <!--                            </div>-->
            <!--                        </div>-->
									
									
									
									 <?php
                       
$sql8 = "SELECT * FROM users where id ='$id'";
$result8 = mysqli_query($selecter, $sql8);

if ($result8 && $result8->num_rows > 0) {
    while($row8 = $result8->fetch_assoc()){
    $full_name = mysqli_real_escape_string($selecter, $row8['full_name']);
    $user_id = mysqli_real_escape_string($selecter, $row8['user_id']);
    $email_id = mysqli_real_escape_string($selecter, $row8['email_id']);
    $mobile_no = mysqli_real_escape_string($selecter, $row8['mobile_no']);
    $company_name = mysqli_real_escape_string($selecter, $row8['company_name']);
    $gender = mysqli_real_escape_string($selecter, $row8['gender']);
    $company_address = mysqli_real_escape_string($selecter, $row8['company_address']);
    $password = mysqli_real_escape_string($selecter, $row8['password']);
    $blocking_status = mysqli_real_escape_string($selecter, $row8['blocking_status']);
    $wallet_balance = mysqli_real_escape_string($selecter, $row8['wallet_balance']);
    
    $status	 = mysqli_real_escape_string($selecter, $row8['status']);
}
}
                        ?>
									
									
									
									
									
									
									
									
									
									
									
										<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Name</label>
										<div class="col-sm-9">
											<input type="text" class="form-control" id="input38" name="full_name" value="<?php echo $full_name ?>" placeholder="Name" required="">
										</div>
									</div>
									
									<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Email ID</label>
										<div class="col-sm-9">
											<input type="text" class="form-control" id="input38" name="email_id" placeholder="Email" value="<?php echo $email_id ?>" required="">
										</div>
									</div>
									
										<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Mobile NO</label>
										<div class="col-sm-9"> 
											<input type="text" class="form-control" id="input38" name="mobile_no" placeholder="Mobile NO" value="<?php echo $mobile_no ?>" required="">
										</div>
									</div>
										<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Company Name</label>
										<div class="col-sm-9">
											<input type="text" class="form-control" id="input38" name="company_name" placeholder="Company Name" value="<?php echo $company_name ?>" required="">
										</div>
									</div>
									
									
									
									<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Company Address</label>
										<div class="col-sm-9">
											<input type="text" class="form-control" id="input38" name="company_address" placeholder="Company Address" value="<?php echo $company_address ?>" required="">
										</div>
									</div>
									
									<div class="row mb-3">
										<label for="input39" class="col-sm-3 col-form-label">Password</label>
										<div class="col-sm-9">
											<input type="text" class="form-control" id="input38" name="password" placeholder="Password" value="<?php echo $password ?>" required="">
										</div>
									</div>
									
									
									
									
								
									
									<div class="row">
										<label class="col-sm-3 col-form-label"></label>
										<div class="col-sm-9">
											<div class="d-md-flex d-grid align-items-center gap-3">
											    
												<button type="submit" class="btn btn-primary px-4" name="submit2" style="margin-top:5%">Submit</button>
											
											</div>
										</div>
									</div>
								</form>

							</div>
						</div>
					</div>
				</div>
			
			</div>
		</div>
		
		
		
		<?php include 'include/footer.php'; ?>