SHARE
TWEET

Untitled

Rofihimam Oct 23rd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <link rel="stylesheet" type="text/css" href="assets/tambah.css">
  2. <link href="https://fonts.googleapis.com/css?family=Bree+Serif&display=swap" rel="stylesheet">
  3.  
  4. <?php
  5.     $action = 'tambah.php';
  6.     $disable = '';
  7.     $title = 'Tambah Data';
  8.     if (!empty($siswa)) { $action = 'edit.php'; $disable = 'readonly'; $title = 'Edit Data'; }
  9. ?>
  10.  
  11. <h1><?= $title ?></h1>
  12.  
  13. <form action="<?= $action ?>" method="POST">
  14.     <table align="center" border="1" cellspacing="5">
  15.         <tr>
  16.             <td>NIS</td>
  17.             <td>
  18.                 <input class="isi" type="text" name="nis" required="" autocomplete="off" value="<?= @$siswa['nis'] ?>" <?= $disable ?>>
  19.             </td>
  20.         </tr>
  21.         <tr>
  22.             <td>Nama Lengkap</td>
  23.             <td><input class="isi" type="text" name="nama_lengkap" required="" autocomplete="off" value="<?= @$siswa['nama_lengkap'] ?>"></td>
  24.         </tr>
  25.         <tr>
  26.             <td>Jenis Kelamin</td>
  27.             <td>
  28.                 <input type="radio" name="jenis_kelamin" value="L" <?= @$siswa['jenis_kelamin'] == 'L' ? 'checked' : '' ?>> Laki-Laki
  29.                 <input type="radio" name="jenis_kelamin" value="P" <?= @$siswa['jenis_kelamin'] == 'P' ? 'checked' : '' ?>> Perempuan
  30.             </td>
  31.         </tr>
  32.         <tr>
  33.             <td>Kelas</td>
  34.             <td>
  35.                 <select name="kelas">
  36.                     <option value="XI-RPL1" <?= @$siswa['kelas'] == 'XI-RPL1' ? 'selected' : ''  ?>>XI-RPL1</option>
  37.                     <option value="XI-RPL2" <?= @$siswa['kelas'] == 'XI-RPL2' ? 'selected' : ''  ?>>XI-RPL2</option>
  38.                     <option value="XI-RPL3" <?= @$siswa['kelas'] == 'XI-RPL3' ? 'selected' : ''  ?>>XI-RPL3</option>
  39.                 </select>          
  40.             </td>
  41.         </tr>
  42.         <tr>
  43.             <td>Jurusan</td>
  44.             <td><input class="isi" type="text" name="jurusan" required="" autocomplete="off" value="<?= @$siswa['jurusan'] ?>"></td>
  45.         </tr>
  46.         <tr>
  47.             <td>Alamat</td>
  48.             <td><input class="isi" type="text" name="alamat" required="" autocomplete="off" value="<?= @$siswa['alamat'] ?>"></td>
  49.         </tr>
  50.         <tr>
  51.             <td>Golongan Darah</td>
  52.             <td>
  53.                 <select name="golongan_darah">
  54.                     <option value="A" <?= @$siswa['golongan_darah'] == 'A' ? 'selected' : '' ?>>A</option>
  55.                     <option value="B" <?= @$siswa['golongan_darah'] == 'B' ? 'selected' : '' ?>>B</option>
  56.                     <option value="O" <?= @$siswa['golongan_darah'] == 'O' ? 'selected' : '' ?>>O</option>
  57.                     <option value="AB" <?= @$siswa['golongan_darah'] == 'AB' ? 'selected' : '' ?>>AB</option>
  58.                 </select>
  59.             </td>
  60.         </tr>
  61.         <tr>
  62.             <td>Nama Ibu Kandung</td>
  63.             <td><input class="isi" type="text" name="nama_ibu_kandung" required="" autocomplete="off" value="<?= @$siswa['nama_ibu_kandung'] ?>"></td>
  64.         </tr>
  65.         <tr>
  66.             <td height="40px" colspan="2" align="center"><input class="button" type="submit" value="Simpan"></td>
  67.         </tr>
  68.     </table>
  69. </form>
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