Advertisement
dysphafiz_

Untitled

Oct 29th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Kasus 2</title>
  5.     <style type="text/css">
  6.         body{
  7.             font-family: verdana;
  8.             font-size: 20px;
  9.             background-color: #2ecc71;
  10.         }
  11.  
  12.         input[type="text"]{
  13.             width: 65px;
  14.             transition: 0.5s;
  15.             border-radius: 6px;
  16.         }
  17.  
  18.         input[type="text"]:focus{
  19.             width: 110px;
  20.             text-align: center;
  21.         }
  22.  
  23.         input.button{
  24.             color: black;
  25.             background: white;
  26.             border: 2px darkgray outset;
  27.             padding: 5px 20px;
  28.             font-size: 14px;
  29.             transition: 0.5s;
  30.             border-radius: 6px;
  31.         }
  32.         input.button:hover{
  33.             color: white;
  34.             background: black;
  35.         }
  36.     </style>
  37. </head>
  38. <body>
  39.     <center>
  40.     <h1>Form Input Data Siswa</h1>
  41.     <h3>SMKN 4 Bandung</h3>
  42.  
  43.     <form method="post">
  44.         <label>Masukan Jumlah Siswa</label>
  45.         <input type="text" name="a" autocomplete="off">
  46.         <input class="button" type="submit" name="b" value="ok">
  47.    
  48.  
  49.  
  50.     <table><br>
  51.  
  52.         <?php
  53.         for ($i=1; $i <= $_POST['a'] ; $i++):
  54.          ?>
  55.  
  56.          <tr>
  57.             <td>Nama : <input type="text" name="nama" autocomplete="off"></td>
  58.             <td>Jurusan
  59.                 <td>:
  60.                     <input type="radio" name="jurusan<?php echo $i ?>" value="RPL">RPL
  61.                     <input type="radio" name="jurusan<?php echo $i ?>" value="TKJ">TKJ
  62.                     <input type="radio" name="jurusan<?php echo $i ?>" value="MM">MM
  63.                     <input type="radio" name="jurusan<?php echo $i ?>" value="AVI">AVI
  64.                     <input type="radio" name="jurusan<?php echo $i ?>" value="TITL">TITL
  65.                     <input type="radio" name="jurusan<?php echo $i ?>" value="TOI">TOI
  66.                 </td>
  67.             </td>
  68.          </tr>
  69.  
  70.          <?php
  71.         endfor;
  72.         ?>
  73.  
  74.           <tr>
  75.             <td colspan="3" style="text-align: center;">
  76.                 <input class="button" type="submit" name="submit" value="Submit">
  77.             </td>
  78.           </tr>
  79.     </table>
  80.     </form>
  81.     </center>
  82. </body>
  83. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement