Advertisement
Hadi1989

Untitled

Jan 22nd, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.     require_once 'conn.php';
  3.  
  4.     if(ISSET($_POST['remove'])){
  5.         if(ISSET($_POST['mem_id'])){
  6.             foreach($_POST['mem_id'] as $key => $value){
  7.                 mysqli_query($conn, "DELETE FROM `member` WHERE `mem_id` = '$value'") or die(mysqli_error());
  8.             }
  9.  
  10.             header('location: index.php');
  11.         }else{
  12.             echo "<script>alert('Please select something first!')</script>";
  13.             echo "<script>window.location= 'index.php'</script>";
  14.         }
  15.     }
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement