Posts

Showing posts from February, 2020

SCRIPT UPDATE PROSES PHP

UPDATE <?php include 'koneksi.php'; $id_izin= $_POST ['id_izin']; $nama = $_POST ['nama']; $kelas = $_POST ['kelas']; $jurusan = $_POST ['jurusan']; $ortu= $_POST ['ortu']; $tgl_izin= $_POST ['tgl_izin']; $tgl_masuk= $_POST ['tgl_masuk']; mysqli_query($koneksi,"update izin set id_izin='$id_izin',nama='$nama',jurusan='$jurusan',ortu='$ortu',tgl_izin='$tgl_izin',tgl_masuk='$tgl_masuk' where id_izin='$id_izin'"); header("location:showizin.php"); ?>

SCRIPT UPDATE PHP

UPDATE <?php include 'koneksi.php' ; @$id = $_GET['id']; $data = mysqli_query($koneksi, "select * from izin where id_izin='$id'"); $d = mysqli_fetch_array($data);{ ?> <form method="post" action="updateprosesizin.php"> <center><table width="500" height="200" border="10" cellpadding="10" cellspacing="5"> <tr> <td>ID Izin</td>           <td>:</td> <td><input type="text" readonly name="id_izin" value="<?php echo $d['id_izin']; ?>"></td></tr>       <tr> <td>Nama Siswa</td>           <td>:</td> <td><input type="text" name="nama" value="<?php echo $d['nama']; ?>"></td></tr> <tr>         &l

SCRIPT SEARCH PHP

SEARCH <!DOCTYPE html> <html> <head> <title></title> </head> <body >  <?php include 'koneksi.php'; ?> <center><form action="searchizin.php" method="get">   <label>Cari :</label>   <input type="text" name="cari">   <input type="submit" value="Cari"> </form> <br> <?php if(isset($_GET['cari'])){   $cari = $_GET['cari'];   echo "<b>Hasil pencarian : ".$cari."</b>"; } ?>   <center><table width="0" border="10" cellspacing="0" cellpadding="20">      <tr>               <th>No</th>               <th>ID Izin</th>               <th>Nama Siswa</th>               <th>Kelas</th>               <th>Jurusan</th>               <th>Nama

SCRIPT LOGOUT PHP

LOGOUT <script language="javascript"> confirm("Apakah anda yakin untuk logout?"); document.location = "login.php"; </script> <?php session_start(); session_destroy();; ?>

SCRIPT INSERT PHP

<?php include "koneksi.php"; $id_izin= $_POST ['id_izin']; $nama = $_POST ['nama']; $kelas= $_POST ['kelas']; $jurusan= $_POST ['jurusan']; $ortu = $_POST ['ortu']; $tgl_izin= $_POST ['tgl_izin']; $tgl_masuk= $_POST ['tgl_masuk']; mysqli_query ($koneksi, "insert into izin values ('$id_izin', '$nama', '$kelas','$jurusan','$ortu','$tgl_izin','$tgl_masuk') "); header ("location:showizin.php"); ?>

SCRIPT KONEKSI PHP

KONEKSI <?php $koneksi = mysqli_connect("localhost","root",""," ijin "); ?>

SCRIPT FORM PHP

FORM   <!-- Main Content -->  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Form Izin</title> </head> <body> <form method="post" action="insertizin.php"> <center><table width="500" height="200" border="10" cellpadding="10" cellspacing="5">   <tr>     <td>ID Perizinan</td>     <td>:</td>     <td><input type="text" name="id_izin"></td>   </tr>   <tr>     <td>Nama Siswa</td>     <td>:</td>     <td><input type="text" name="nama"></td>   <