<?php session_start();
if($_SESSION){
?>
<html>
<head>
  <title> New Booking </title>
<style type="text/css">
  td{
    color: black;
  }
  th{
    color: black;
    font-family:Monotype Corsiva;
    font-size: 30px;
  }
  #myInput {
  background-image: url('/css/searchicon.png');
  background-position: 10px 10px;
  background-repeat: no-repeat;
  width: 100%;
  font-size: 12px;
  padding: 12px 20px 12px 40px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}
</style>
</head>

<body >
 <?php include 'adminheader.php';?><br><br><br><br><br>
 <div class="container">
 <h3 class="text-red" style="text-align: center;color:black;font-family:Monotype Corsiva;font-size: 40px;"><b> View Venues </b></h3>
   
       <?php
  error_reporting(0);
     $conn = new mysqli("localhost","root","","event");
     $query="SELECT * FROM book";
     $data=mysqli_query($conn,$query);
    
     
     
     
    
      ?>
    <label ><b>Event place:</b></label>
       <SELECT>
     
      <?php
    
      while ( $result =mysqli_fetch_assoc($data)) {
      ?>
       
         
          <option ><?php echo $result['eqi1']?></option>
        
            <?php } ?> 
         
       

    </SELECT>
   
    









</div>
<script type="text/javascript">
  function myFunction() {
  var input, filter, table, tr, td, i, txtValue;
  input = document.getElementById("myInput");
  filter = input.value.toUpperCase();
  table = document.getElementById("myTable");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    td = tr[i].getElementsByTagName("td")[0];
    if (td) {
      txtValue = td.textContent || td.innerText;
      if (txtValue.toUpperCase().indexOf(filter) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }       
  }
}
</script></body>
</html><?php
 $conn = new mysqli("localhost","root","","event");
 $id= $_GET['i'];
 $query ="DELETE FROM add_event WHERE id='".$id."'";
 $data=mysqli_query($conn,$query);

 


?>
<?php
  }
  else{
    echo "<script>
   alert('You have to  login first...!');
   window.location.href='event2.php';
   </script>";
  }
  
?>