 <?php
   include('includes/connection.php'); 
   $id= $_GET['del'];
   $q ="DELETE FROM `class_srms` WHERE class_id = $id ";
   $del=mysqli_query($conn,$q);
    if($del){ 
         header("location:admin.php?page=class");
      }  
      else{
        ?>  
        <script type="text/javascript">
         alert("Sorry Delete Failed Try Again");
        </script>
        <?php
    } 
  
?>