Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link href="https://fonts.googleapis.com/css?family=Bree+Serif&display=swap" rel="stylesheet">
- <style type="text/css">
- h1, p{
- font-family: 'Bree Serif', serif;
- text-align: center;
- }
- table{
- border: 5px outset darkblue;
- background: linear-gradient(to right, #0033cc 0%, #ff0066 100%);
- }
- th{
- font-family: 'Bree Serif', serif;
- font-size: 25px;
- width: 200px;
- }
- td{
- font-family: 'Bree Serif', serif;
- font-size: 20px;
- }
- td.batas{
- height: 5px;
- border-radius: 50px;
- background-color: cyan;
- }
- .no{
- width: 50px;
- }
- input{
- border: 2px inset black;
- background-color: silver;
- font-family: 'Bree Serif', serif;
- font-size: 15px;
- border-radius: 50px;
- text-align: center;
- width: 200px;
- }
- input#button{
- border: 3px outset blue;
- background-color: silver;
- font-family: 'Bree Serif', serif;
- transition-duration: 0.5s;
- font-size: 15px;
- border-radius: 50px;
- width: 50px;
- }
- input#button:hover{
- border: 3px outset blue;
- background: linear-gradient(to bottom, #0033cc 0%, #ff0066 100%);
- font-family: 'Bree Serif', serif;
- font-size: 17px;
- border-radius: 50px;
- width: 50px;
- color: white;
- }
- </style>
- <h1>Form Input Data Siswa</h1>
- <form id="studi1" name="studi1" method="post">
- <p>
- Masukan Jumlah Siswa :
- <input type="number" name="jumlahSiswa" id="jumlahSiswa" autocomplete="off" required="">
- <input type="submit" name="button" id="button" value="OK">
- </p>
- </form>
- <table align="center" cellspacing="5">
- <tr>
- <th class="no">No</th>
- <th>NIS</th>
- <th>Nama</th>
- <th>Alamat</th>
- </tr>
- <tr>
- <td class="batas" colspan="4"></td>
- </tr>
- <?php
- if (isset($_POST['button'])) {
- $jumlahSiswa = $_POST['jumlahSiswa'];
- for ($x = 1; $x <= $jumlahSiswa; $x++) {
- ?>
- <tr>
- <td>
- <input class="no" type="text" name="no" id="no" autocomplete="off" value="<?php echo $x; ?>" disabled>
- </td>
- <td>
- <input type="text" name="nis" id="nis" autocomplete="off">
- </td>
- <td>
- <input type="text" name="nama" id="nama" autocomplete="off">
- </td>
- <td>
- <input type="text" name="alamat" id="alamat" autocomplete="off">
- </td>
- <?php } } ?>
- </tr>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement