SHARE
TWEET

Untitled

Rofihimam Oct 1st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <link href="https://fonts.googleapis.com/css?family=Bree+Serif&display=swap" rel="stylesheet">
  2. <style type="text/css">
  3.     h1, p{
  4.         font-family: 'Bree Serif', serif;
  5.         text-align: center;
  6.     }
  7.     table{
  8.         border: 5px outset darkblue;
  9.         background: linear-gradient(to right, #0033cc 0%, #ff0066 100%);
  10.     }
  11.     th{
  12.         font-family: 'Bree Serif', serif;
  13.         font-size: 25px;
  14.         width: 200px;
  15.     }
  16.     td{
  17.         font-family: 'Bree Serif', serif;
  18.         font-size: 20px;
  19.     }
  20.     td.batas{
  21.         height: 5px;
  22.         border-radius: 50px;
  23.         background-color: cyan;
  24.     }
  25.     .no{
  26.         width: 50px;
  27.     }
  28.     input{
  29.         border: 2px inset black;
  30.         background-color: silver;
  31.         font-family: 'Bree Serif', serif;
  32.         font-size: 15px;
  33.         border-radius: 50px;
  34.         text-align: center;
  35.         width: 200px;
  36.     }
  37.     input#button{
  38.         border: 3px outset blue;
  39.         background-color: silver;
  40.         font-family: 'Bree Serif', serif;
  41.         transition-duration: 0.5s;
  42.         font-size: 15px;
  43.         border-radius: 50px;
  44.         width: 50px;
  45.     }
  46.     input#button:hover{
  47.         border: 3px outset blue;
  48.         background: linear-gradient(to bottom, #0033cc 0%, #ff0066 100%);
  49.         font-family: 'Bree Serif', serif;
  50.         font-size: 17px;
  51.         border-radius: 50px;
  52.         width: 50px;
  53.         color: white;
  54.     }
  55. </style>
  56.  
  57. <h1>Form Input Data Siswa</h1>
  58. <form id="studi1" name="studi1" method="post"> 
  59.     <p>
  60.         Masukan Jumlah Siswa :
  61.         <input type="number" name="jumlahSiswa" id="jumlahSiswa" autocomplete="off" required="">
  62.         <input type="submit" name="button" id="button" value="OK">
  63.     </p>
  64. </form>
  65. <table align="center" cellspacing="5">
  66.     <tr>
  67.         <th class="no">No</th>
  68.         <th>NIS</th>
  69.         <th>Nama</th>
  70.         <th>Alamat</th>
  71.     </tr>
  72.     <tr>
  73.         <td class="batas" colspan="4"></td>
  74.     </tr>
  75.  
  76.     <?php
  77.     if (isset($_POST['button'])) {
  78.         $jumlahSiswa = $_POST['jumlahSiswa'];
  79.  
  80.         for ($x = 1; $x <= $jumlahSiswa; $x++) {
  81.     ?>
  82.     <tr>
  83.         <td>
  84.             <input class="no" type="text" name="no" id="no" autocomplete="off" value="<?php echo $x; ?>" disabled>         
  85.         </td>
  86.         <td>
  87.             <input type="text" name="nis" id="nis" autocomplete="off">
  88.         </td>
  89.         <td>
  90.             <input type="text" name="nama" id="nama" autocomplete="off">
  91.         </td>
  92.         <td>
  93.             <input type="text" name="alamat" id="alamat" autocomplete="off">
  94.         </td>
  95.     <?php } } ?>
  96.     </tr>
  97. </table>
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