Wednesday 7 January 2015

Contoh script input biodata dengan html dan hasil prosesnya

biodata.html

<head>
<title> Form Biodata AuliyaRahmah</title>
</head>
<body>
<p>Selamat Anda berhasil login sebagai : Admin <a href='session03.php'>Logout</a></p>


<h1 >Biodata</h1>
<form name="input biodata" method="post" action="proses.php">

<table width="900" border="0">
  </tr>
  <tr>
    <td width="163" size font="56">Nama</td>
    <td width="326"> :
    <input name="txtNama" type="text" id="txtNama"></td>
  </tr>
  <tr>
    <td width="163" size font="56">Npm</td>
    <td width="326"> :
    <input name="txtNpm" type="text" id="txtNpm"></td>
  </tr>
  <tr>
    <td >Jurusan</td>
    <td > :
    <input type="radio" name="jurusan" value="Teknik Informatika" checked> TI   <input type="radio" name="jurusan" value="Sistem Informasi"> SI   <input type="radio" name="jurusan" value=“Manajemen Informatika"> MI
    </td>
  </tr>  
  <tr>
  <td>Jenis Kelamin</td> 
  <td>: 
  <select name="JK">
  <option selected value ="Pilih">Pilih</option>
  <option value="Laki laki">Laki laki</option>
  <option value="Perempuan">Perempuan</option>
  </select>
  </td>
  </tr>
  <tr>
    <td>Hobi</td>
    <td>:
    <input name="hobi" type="checkbox" value="Membaca">Membaca
    <input name="hobi" type="checkbox" value="Jalan-jalan">Jalan-jalan
    <input name="hobi" type="checkbox" value="Olah raga">Olah raga
    </td>
  </tr>
     <td>Pesan/kesan</td>
     <td><textarea name="txtPesan" cols="50" rows="5" id="txtPesan"></textarea></td>
   </tr>
   <td></td>
     <td>
    <input type="submit" value="Submit" ></td>
</table>
</form>
</body>
</html>


Proses.php


<?php
    echo "<h1>Biodata</h1>";
    echo "</br>";
    echo "<table width='100%' border='0'>";

    echo "<tr bgcolor=#CCCCCC>";
    echo "<td width='300'>"."Nama"."</td>";
    echo "<td>".": ".$_POST['txtNama']."</td>";
    echo "</tr>";

    echo "<tr bgcolor=white>";
    echo "<td width='300'>"."Npm"."</td>";
    echo "<td>".": ".$_POST['txtNpm']."</td>";
    echo "</tr>";

    echo "<tr bgcolor=#CCCCCC>";
    echo "<td width='300'>"."Jurusan"."</td>";
    echo "<td>".": ".$_POST['jurusan']."</td>";
    echo "</tr>";

    echo "<tr bgcolor=white>";
    echo "<td width='300'>"."Jenis Kelamin"."</td>";
    echo "<td>".": ".$_POST['JK']."</td>";
    echo "</tr>";

    echo "<tr bgcolor=#CCCCCC>";
    echo "<td width='300'>"."Hobi "."</td>";
    echo "<td>".": ".$_POST['hobi']."</td>";
    echo "</tr>";

    echo "<tr bgcolor=white>";
    echo "<td width='300'>"."Pesan/kesan"."</td>";
    echo "<td>".": ".$_POST['txtPesan']."</td>";
    echo "</tr>";
               
                echo "<tr bgcolor=white>";
                echo "<table width='100%' border='0'>";
    echo "<h2><a href='session03.php'>Logout</a></h2>";
?>

we

Download script Link1 / Link2

No comments:

Post a Comment