SHARE
TWEET

Untitled

Rofihimam Oct 16th, 2019 81 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.         $alamat = $_POST['alamat'];
  11.         $golongan_darah = $_POST['golongan_darah'];
  12.         $nama_ibu_kandung = $_POST['nama_ibu_kandung'];
  13.  
  14.         $sql = "INSERT INTO siswa (nis, nama_lengkap, jenis_kelamin, kelas, jurusan, alamat, golongan_darah, nama_ibu_kandung)
  15.         VALUES ('$nis', '$nama_lengkap', '$jenis_kelamin', '$kelas', '$jurusan', '$alamat', '$golongan_darah', '$nama_ibu_kandung')";
  16.  
  17.         $mysqli -> query($sql) or die ($mysqli -> error);
  18.  
  19.         header('location: index.php');
  20.     }
  21.  
  22.     include 'views/v_tambah.php';
  23. ?>
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