Advertisement
bungfaz46

fazri

Aug 26th, 2018
1,560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     include('../conn.php');
  3.     $id=$_REQUEST['id'];
  4.     $user=$_POST['user'];
  5.    
  6.     if (empty($user)){
  7.     ?>
  8.         <script>
  9.             window.alert('Please select user');
  10.             window.history.back();
  11.         </script>
  12.     <?php
  13.     }
  14.     else{
  15.     mysqli_query($conn,"insert into chat_member (userid, chatroomid) values ('$user','$id')");
  16.    
  17.     ?>
  18.         <script>
  19.             window.alert('Member Added Successfully');
  20.             window.history.back();
  21.         </script>
  22.     <?php
  23.     }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement