Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <html>
  2.  
  3. <head>
  4.     <title>For</title>
  5. </head>
  6.  
  7. <body>
  8.     <link rel="stylesheet" href="for.css">
  9.     <form method="post">
  10.         <table align="center">
  11.             <tr>
  12.                 <center>
  13.                     <h1>DAFTAR JURUSAN SISWA</h1>
  14.                     <h2>Smkn 4 Bandung</h2>
  15.                 </center>
  16.                 <td>Masukan Jumlah Siswa : <input type="text" name="in"></td>
  17.                 <td><input type="submit" name="ok" value="OK"></td>
  18.             </tr>
  19.         </table>
  20.     </form>
  21.     <br>
  22.  
  23.     <table align="center">
  24.         <tr>
  25.             <?php
  26.                     if (isset($_POST['ok'])) :
  27.                    for ($i=1; $i <= $_POST['in'] ; $i++) :
  28.                 ?>
  29.                 <td>
  30.                     Nama : <input type="text" name="nama">
  31.                 </td>
  32.                 <td>
  33.                     Jurusan :
  34.                     <input type="radio" value="rpl" name="jurusan<?php echo $i?>">RPL
  35.                     <input type="radio" value="tkj" name="jurusan<?php echo $i?>">TKJ
  36.                     <input type="radio" value="mm" name="jurusan<?php echo $i?>">MM
  37.                     <input type="radio" value="av" name="jurusan<?php echo $i?>">AV
  38.                     <input type="radio" value="titl" name="jurusan<?php echo $i?>">TITL
  39.                     <input type="radio" value="toi" name="jurusan <?php echo $i?>">TOI
  40.                 </td>
  41.         </tr>
  42.         <?php
  43.             endfor;
  44.             endif;
  45.             ?>
  46.     </table>
  47.     <center>
  48.         <p>
  49.             <input type="button" name="submit" value="Submit">
  50.         </p>
  51.     </center>
  52. </body>
  53.  
  54. </html>