<?php
include 'connection.php';
if(isset($_GET['id']))
{
$sel=mysqli_query($con,"select * from places where
id='".$_GET['id']."' ");
while ($fetch=mysqli_fetch_array($
sel))
{
$img=$fetch["photo"];
}
$isrc="images/".$img;
unlink($isrc);
$query= 'delete from places where id="'.$_GET['id'].'" ' ;
$result = mysqli_query($con,$query);
if($result)
{
echo '<script type="text/javascript">';
echo " alert('Record Deleted');";
echo 'window.location.href = "viewplace.php";';
echo '</script>';
}
else
{
echo "Error !!!";
}
}
include 'connection.php';
if(isset($_GET['id']))
{
$sel=mysqli_query($con,"select * from places where
id='".$_GET['id']."' ");
while ($fetch=mysqli_fetch_array($
{
$img=$fetch["photo"];
}
$isrc="images/".$img;
unlink($isrc);
$query= 'delete from places where id="'.$_GET['id'].'" ' ;
$result = mysqli_query($con,$query);
if($result)
{
echo '<script type="text/javascript">';
echo " alert('Record Deleted');";
echo 'window.location.href = "viewplace.php";';
echo '</script>';
}
else
{
echo "Error !!!";
}
}
ConversionConversion EmoticonEmoticon