Your IP : 10.1.73.149


Current Path : /home/bolconlineco/www/admin/
Upload File :
Current File : //home/bolconlineco/www/admin/delete_suportmaterials.php

<?php 
  ob_start();
  session_start();
  ?>
<?php

include('../includes/connection/func.inc.php');


   if(isset($_GET['id'])) // Start of if condition
  
     {
		 
		 $id = $_GET['id'];
		 
		 $query = "SELECT name from sportmaterials where id='$id'";
		 
		 $result = mysql_query($query) or die(mysql_error());
		 
		 $fetch = mysql_fetch_array($result);
		 
		 if(file_exists('../sportmaterials/'.$fetch['name']))
		  
		   {
			  unlink('../sportmaterials/'.$fetch['name']);   
			   
		   }
		   
		   $qq = "delete from sportmaterials where id='$id'";
		   
		   $res = mysql_query($qq) or die(mysql_error());
		   
		   header("location:suportmaterials.php?msg=deleted Successfully");
		   exit();
		
		  
	 } // End of main if condition


?>