/home/hdwebsolution/public_html/ns-interior/admin-pages/testimonial-list.php
<?php include('site-header.php'); ?>
<?php include('left-nevigation.php'); ?>
   <main id="playground">
 <?php include('site-top-header.php'); ?>
 <?php  $testi_id=$_REQUEST['testi_id']; ?>
<?php
$psql="select * from tbl_testimonial where cate_parent_id='$testi_id'";
$pdata=mysqli_query($link,$psql);
$Presult=mysqli_fetch_array($pdata);
$catp_id=$Presult['cate_parent_id'];
$sqlcat="select * from tbl_testimonial where testi_id='$catp_id'";
$datacat=mysqli_query($link,$sqlcat);
$resultcat=mysqli_fetch_array($datacat);
?>
<section id="page-title" class="row">
      <div class="col-md-8">
        <h1>Testimonial List</h1>
        <p class="lead">View / Edit your Testimonial</strong>.</p>
         <p><a href="add-edit-testimonial.php" class="btn btn-primary">Add New Testimonial</a></p> 
      </div>
 
      <div class="col-md-4">
       <!--  <ol class="breadcrumb pull-right no-margin-bottom">
          
          <li><a href="dashboard.php">Testimonial List</a></li>
          <li class="active">Update Testimonial</li><br><br>
         
        </ol> -->
        
      </div>
    </section>
	
<?php
if(isset($_REQUEST['del'])){
$sql="delete from tbl_testimonial where testi_id=$_REQUEST[del]";  
$sqldat=mysqli_query($link,$sql);
}
?>
<?php
$sql="select * from tbl_testimonial where 1";
$data=mysqli_query($link,$sql);
?>	
    <!-- / PAGE TITLE -->
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-12">
          <section class="panel panel-primary">
            <header class="panel-heading">
              <h3 class="panel-title">Your Testimonial List</h3>
            </header>
            <table class="table table-hover table-responsive">
            <tbody>
              <tr>
                <th scope="row">S. No</th>
                <!-- <td> Name</td> -->
                <td>Description</td>
                <td>Action</td>
              </tr>
              <tr>
              <?php
    			    $i=0;
    			    while($result=mysqli_fetch_array($data)){ 
      				$i++;
      				?>
                <th scope="row"><?php echo $i ?></th>
                <!-- <td><?php echo $result['testi_name']; ?></td> -->
                
                <td> <?php echo $result['testi_desc']; ?> </td>
                <td><a href="add-edit-testimonial.php?Updt_id=<?php echo $result['testi_id'];?>" class="btn btn-primary" style="width:100px;">Edit</a><br>
                 <form method="post">
                <input type="hidden" name="del" value="<?php echo $result['testi_id'];?>">
                  <button class="btn btn-danger" style="width:100px;">Delete</button> </td>
                </form> 
              </tr>
              <?php } ?>
           
            </tbody>
            </table>
          </section>
        </div>
      </div>
    </div>
    <!-- / container-fluid -->
 <?php include('site-footer.php'); ?>