<?php
session_start();
error_reporting(0);
/* Database connection start */
include_once("connection.php");
/* Database connection end */
$data_ids = $_REQUEST['data_ids'];
date_default_timezone_set('Asia/Kolkata');
$data_id_array = explode(",", $data_ids); 
if(!empty($data_id_array)) {
	foreach($data_id_array as $id) {
		$select_gallery_img="SELECT gi_id,small_img,big_img FROM tbl_gallery_img where gt_id='".$id."'";
		$exec_select_gallery_img=mysqli_query($conn,$select_gallery_img) or die("error");
		while($row=mysqli_fetch_array($exec_select_gallery_img)){
			unlink('userdata/sm_img/'.$row['small_img']);unlink('userdata/bg_img/'.$row['big_img']);
			$sql = "delete from tbl_gallery_img where gi_id='".$row['gi_id']."'";
		
	
		$query=mysqli_query($conn, $sql) or die("Testimonial-delete.php: delete");
		}
		$sql_title = "delete from tbl_gallery_title where gt_id='".$id."'";
		
	
$query_sql_title=mysqli_query($conn, $sql_title) or die("Testimonial-delete.php: delete");
		
		
		
	}
}
?>