SHARE
TWEET

29.3

CHaNStar Oct 23rd, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  $action = 'tambah.php';
  3.  $kasus = '';
  4.  if (!empty($siswa)) {
  5.   $action = 'edit.php';
  6.   $kasus = 'readonly';
  7.  }
  8.  ?>
  9.  <form action="<?= $action ?>
  10. " method="post">
  11.  <table align="center">
  12. <tr>
  13.    <td align="center" colspan="2"><h1>
  14. Data</h1>
  15. </td>
  16.   </tr>
  17. <tr>
  18.    <td>NIS</td>
  19.    <td><input type="number" name="nis" value="<?= @$siswa['nis'] ?>" <?= $kasus ?>></td>
  20.   </tr>
  21. <tr>
  22.    <td>Nama Lengkap</td>
  23.    <td><input type="text" name="nama_lengkap" 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><select name="kelas">
  35.     <option value="XI-RPL1" <?= @$siswa['kelas'] == 'XI-RPL1' ? 'selected' : '' ?>>XI-RPL1</option>
  36.     <option value="XI-RPL2" <?= @$siswa['kelas'] == 'XI-RPL2' ? 'selected' : '' ?>>XI-RPL2</option>
  37.     <option value="XI-RPL3" <?= @$siswa['kelas'] == 'XI-RPL3' ? 'selected' : '' ?>>XI-RPL3</option>
  38.     </select>
  39.    </td>
  40.   </tr>
  41. <tr>
  42.    <td>Jurusan</td>
  43.    <td><input type="text" name="jurusan" value="<?= @$siswa['jurusan'] ?>"></td>
  44.   </tr>
  45. <tr>
  46.    <td>Alamat</td>
  47.    <td><input type="text" name="alamat" value="<?= @$siswa['alamat'] ?>"></td>
  48.   </tr>
  49. <tr>
  50.    <td>Golongan Darah</td>
  51.    <td><select name="goldar">
  52.     <option value="O" <?= @$siswa['golongan_darah'] == 'O' ? 'selected' : '' ?>>O</option>
  53.     <option value="A" <?= @$siswa['golongan_darah'] == 'A' ? 'selected' : '' ?>>A</option>
  54.     <option value="B" <?= @$siswa['golongan_darah'] == 'B' ? 'selected' : '' ?>>B</option>
  55.     <option value="AB" <?= @$siswa['golongan_darah'] == 'AB' ? 'selected' : '' ?>>AB</option>
  56.    </select>
  57.    </td>
  58.   </tr>
  59. <tr>
  60.    <td>Nama Ibu Kandung</td>
  61.    <td><input type="text" name="namaibu" value="<?= @$siswa['nama_ibu'] ?>"></td>
  62.   </tr>
  63. <tr>
  64.    <td></td>
  65.    <td><input class="a" type="submit" name="submit" value="Simpan"></td>
  66.   </tr>
  67. </table>
  68. </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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top