Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. if($_SERVER['REQUEST_METHOD']=='POST'){
  4.  
  5. $nid = $_POST['nid'];
  6.  
  7. $npm = $_POST['npm'];
  8.  
  9. $id_matkul = $_POST['id_matkul'];
  10.  
  11.  
  12.  
  13. require_once('dbConnect.php');
  14.  
  15.  
  16.  
  17. $sql = "INSERT INTO tbl_jadwal (nid,npm,id_matkul) VALUES ('$nid','$npm','$id_matkul')";
  18.  
  19.  
  20.  
  21.  
  22.  
  23. if(mysqli_query($con,$sql)){
  24.  
  25. echo "Successfully";
  26.  
  27. }else{
  28.  
  29. echo "Could not save";
  30.  
  31.  
  32.  
  33. }
  34.  
  35. }else{
  36.  
  37. echo 'error';
  38.  
  39. }
  40.  
  41.  
  42.  
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement