File "contactEnquiry.php"
Full Path: /home/krishnamexports/public_html/panel/pages/sub_category/contactEnquiry.php
File size: 2.07 KB
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8
<?php
if(isset($_GET['delete_id']))
{
$id = $_GET['delete_id'];
$sql = mysqli_query($cn, "delete from tbl_contact where id='$id'");
if($sql)
{
echo '<div class="alert alert-success"><strong>Success!</strong> Contact Enquiry Deleted Successfully.</div>';
}
else
{
echo "error: " . $sql . "<br>" . mysqli_error($conn);
}
}
?>
<div class="col-md-12">
<div class="card">
<div class="card-body">
<h4 class="card-title">CONTACT / GET IN TOUCH ENQUIRY</h4>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>S.No.</th>
<th>Date</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>Country</th>
<th>Message</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
$sqlContact = mysqli_query($cn, "select * from `tbl_contact`");
while($sqlContactData = mysqli_fetch_array($sqlContact)){
?>
<tr>
<td><?php echo $i++;?></td>
<td><?php echo date('d-m-Y',strtotime($sqlContactData['date']));?></td>
<td><?php echo $sqlContactData['name'];?></td>
<td><?php echo $sqlContactData['email'];?></td>
<td><?php echo $sqlContactData['mobile'];?></td>
<td><?php echo $sqlContactData['country'];?></td>
<td><?php echo $sqlContactData['message'];?></td>
<td><a href="home.php?pages=contactEnquiry&delete_id=<?php echo $sqlContactData['id'];?>" onclick="return deleteConfirm();">Delete</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>