<?php 
   session_start();
    include '../assets/constant/config.php';
    
    try {
           $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
           $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
   
           }
           catch(PDOException $e)
           {
           echo "Connection failed: " . $e->getMessage();
           }
   ?>
<?php include('include/sidebar.php');?>

<!--  Author Name: Mayuri K. 
 for any PHP, Codeignitor or Laravel website or software development contact me at mayuri.infospace@gmail.com  -->
<!-- Top Bar End -->
<?php include('include/header.php');?>
<div class="page-content-wrapper ">
   <div class="container-fluid">
      <div class="row">
         <div class="col-sm-12">
            <div class="page-title-box">
               <h4 class="page-title">Show Details</h4>
            </div>
         </div>
         <div class="clearfix"></div>
      </div>
      <!-- end page title end breadcrumb -->
     
      <div class="row">
         <div class="col-lg-12">
            <div class="card">
               <div class="card-body">
                  <div class="table-responsive">
                     <table id="datatable-buttons"  class="table table-striped table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;" enctype="multipart/form-data">
                        <thead>
                        </thead>
                        <tbody>
<?php




$stmt=$conn->prepare("SELECT * FROM `member` WHERE id=? AND delete_status='0'");

//print_r($stmt);
$stmt->execute([$_POST['id']]);
$res=$stmt->fetchAll();
$i=1;
foreach($res as $record) {

 ?>
                           <tr>
                   
                  <h3>  <?php echo $record['name'];?> </h3>
                </tr>
                <tr>
                 <th>Branch:</th>
                 <td><?php echo $record['branch'];?> </td>
                </tr>
                <tr>
                 <th>Gender:</th>
                <td>
    <?php if ($record['gender'] == "1") { ?>
       male
    <?php } elseif ($record['gender'] == "2") { ?>
        female
    <?php } ?>
</td>
                </tr>
                             
                <tr>
                    <th>Status:</th>        
                    <td> <?php if ($record['status'] == "1") { ?>
       inactive
    <?php } elseif ($record['status'] == "2") { ?>
        visitor
    <?php } elseif ($record['status'] == "3") { ?> 
     attender
 <?php }?>
      </td>
                </tr>
                <tr>
                    <th> Marital Status:</th>
                    <td><?php echo $record['marital'];?> </td>
                </tr>
                <tr>
                    <th>Email:</th><td>
                   <a href="../admin/send_email.php?member_id=<?php echo $key['id']; ?>" class="btn btn-primary">Send Email</a></td>
                </tr>
                <tr>
                    <th>Phone:</th>
                        <td><?php echo $record['phone_no'];?> </td>
                    <!-- <a href="sendsms.php?member_id=<?php echo $key['id']; ?>" class="btn btn-primary"> Send SMS</a></td> -->
                    
                     
                </tr>
                <tr>
                    <th>Address:</th>
                    <td><?php echo $record['address'];?>
                     </td>
                </tr>
               <tr>
                    <th> Location:</th>
                    <td><?php echo $record['location'];?></td>
                </tr> 
                <tr>
                    <th> Group:</th>
                    <td><?php echo $record['group'];?></td>
                </tr> 
               <tr>
                    <th> Testfield:</th>
                    <td><?php echo $record['testfield'];?></td>
                </tr> 
                <tr>
                    <th> Department:</th>
                    <td><?php echo $record['department'];?></td>
                </tr> 
                <tr>
                    <th> Uplata:</th>
                    <td><?php echo $record['uplata'];?></td>
                </tr> 
                
                           
                        <?php $i++; } ?>
                         </tbody> 
                     </table>
                  </div>
                  <!--end /tableresponsive-->
               </div>
               <!--end card-body-->
            </div>
            <!--end card-->
         </div>
         <!--end col-->
      </div>
      <!--end row-->
   </div>
   <!-- Page content Wrapper -->
</div>



<!-- content -->
<?php include('include/footer.php');?>

<script>
   function addNews(){
     jQuery.validator.addMethod("alphanumeric", function (value, element) {
    return this.optional(element) || /^(?=.*[a-zA-Z])[a-zA-Z0-9\s!@#$%^&*()_-]+$/.test(value);
   }, "Please enter alphabet characters only");
     
      jQuery.validator.addMethod("lettersonly", function(value, element) {
   // Check if the value is empty
   if (value.trim() === "") {
    return false;
   }
   return /^[a-zA-Z\s]*$/.test(value);
   }, "Please enter alphabet characters only");
   $('#add_news').validate({
    rules: {
      import_file: {
        required: true,
        numbersOnly: true
      },
       
      
      },
    
   });
   };
</script>







































































































