SHARE
TWEET

Untitled

Rofihimam Oct 16th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     include 'lib/library.php';
  3.  
  4.     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  5.         $nis  = $_POST['nis'];
  6.         $nama_lengkap = $_POST['nama_lengkap'];
  7.         $jenis_kelamin = $_POST['jenis_kelamin'];
  8.         $kelas = $_POST['kelas'];
  9.         $jurusan = $_POST['jurusan'];
  10.  
  11.         $sql = "INSERT INTO siswa (nis, nama_lengkap, jenis_kelamin, kelas, jurusan)
  12.         VALUES ('$nis', '$nama_lengkap', '$jenis_kelamin', '$kelas', '$jurusan')";
  13.  
  14.         $mysqli -> query($sql) or die ($mysqli -> error);
  15.  
  16.         header('location: index.php');
  17.     }
  18.  
  19.     include 'views/v_tambah.php';
  20. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top