<?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">Details Show</h4>
            </div>
         </div>
         <div class="clearfix"></div>
      </div>
      <!-- end page title end breadcrumb -->
     
      <div>
      	
<a href=" overview.php"></a>
<a href=" attender.php"></a>
<a href=" report.php"></a> 

      </div>





      <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 `product_review` WHERE id=?");


$stmt=$conn->prepare("SELECT  user.name,user.phone,user.email, branch.branch_name, branch.notes AS branch_notes FROM user JOIN branch ON user.id = branch.b_id WHERE user.id =?");
$stmt->bindParam(1, $_POST['id'], PDO::PARAM_INT);
$stmt->execute();
// print_r($res);
$record=$stmt->fetchAll();
// print_r($record);
$i=1;
 foreach ($record as $key) { ?>

              
                <tr>
                    <th>User Name</th>        
                    <td><?php echo $key['name'];?> </td>
                </tr>
                <tr>
                    <th> phone</th>
                    <td><?php echo $key['phone'];?> </td>
                </tr>
                <tr>
                    <th>email</th>
                    <td><?php echo $key['email'];?> </td>
                </tr>
                <tr>
                    <th>Branch Name</th>
                    <td><?php echo $key['branch_name'];?> </td>
                </tr>
                <tr>
                <th>Branch Note</th>
                 <td><?php echo $key['branch_notes'];?> </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>







































































































