Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> XI-RPL 2</title>
- <link href="assets/style_tambah.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <?php
- $action = 'tambah.php';
- if (!empty($siswa)) $action = 'edit.php';
- ?>
- <form action="<?= $action ?>" method="POST">
- <h1>Add Data</h1>
- <table>
- <tr>
- <td colspan="4">NIS :<br>
- <input type="text" class="text" autocomplete="none" value="<?= @$siswa['nis'] ?>" name="nis"></td>
- </tr>
- <tr>
- <td colspan="4">Nama Lengkap :<br>
- <input type="text" class="text" autocomplete="none" value="<?= @$siswa['nama_lengkap'] ?>" name="nama_lengkap"><br></td>
- </tr>
- <tr>
- <td colspan="4">Jenis Kelamin :</td>
- </tr>
- <tr align="center">
- <td colspan="2"><input type="radio" class="radio" name="jenis_kelamin" value="L" <?= @$siswa['jenis_kelamin'] == 'L' ? 'checked' : '' ?>> Laki-laki</td>
- <td colspan="2"><input type="radio" class="radio" name="jenis_kelamin" value="P" <?= @$siswa['jenis_kelamin'] == 'P' ? 'checked' : '' ?>> Perempuan</td>
- </tr>
- <tr>
- <td colspan="4">Kelas :<br>
- <select name="kelas" class="opsi">
- <option value="XI-RPL1" <?= @$siswa['kelas'] == 'XI-RPL1' ? 'selected' : '' ?>>XI-RPL1</option>
- <option value="XI-RPL2" <?= @$siswa['kelas'] == 'XI-RPL2' ? 'selected' : '' ?>>XI-RPL2</option>
- <option value="XI-RPL3" <?= @$siswa['kelas'] == 'XI-RPL3' ? 'selected' : '' ?>>XI-RPL3</option>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="4">Jurusan :<br>
- <input type="text" class="text" autocomplete="none" value="<?= @$siswa['jurusan'] ?>" name="jurusan"></td>
- </tr>
- <tr>
- <td colspan="4">Alamat :<br>
- <input type="text" class="text" autocomplete="none" value="<?= @$siswa['alamat'] ?>" name="alamat"></td>
- </tr>
- <tr>
- <td cxolspan="4">Golongan Darah :</td>
- </tr>
- <tr align="center">
- <td><input type="radio" class="radio" name="Goldar" value="A" <?= @$siswa['Goldar'] == 'A' ? 'checked' : '' ?>> A</td>
- <td><input type="radio" class="radio" name="Goldar" value="B" <?= @$siswa['Goldar'] == 'B' ? 'checked' : '' ?>> B</td>
- <td><input type="radio" class="radio" name="Goldar" value="AB" <?= @$siswa['Goldar'] == 'AB' ? 'checked' : '' ?>> AB</td>
- <td><input type="radio" class="radio" name="Goldar" value="O" <?= @$siswa['Goldar'] == 'O' ? 'checked' : '' ?>> O</td>
- </tr>
- <tr>
- <td colspan="4">Nama Ibu Kandung :<br>
- <input type="text" class="text" autocomplete="none" value="<?= @$siswa['Nama_ibu'] ?>" name="Nama_ibu"></td>
- </tr>
- <tr>
- <td colspan="4"><input type="submit" value="Tambah Data" class="btn"></td>
- </tr>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement