Membuat Form Menggunakan Bahasa Pemrograman PHP ~ Everything About Company and Who I am

Pages

Monday, April 13, 2015

Membuat Form Menggunakan Bahasa Pemrograman PHP










Scripts :






 <form action="" method="post">
<table width="30%" border="8" cellspacing="4" bordercolor="Blue" align="center" >
 <tr>
   <th colspan="2"><img src="b.jpg" width="400" height="150" align="center"></th>
 </tr>
 </tr>
<th colspan="2">
<marquee width="100%" bgcolor="#33ff33" style="font-family:algerian; font-size:24px; color:#cc0000">STIMIK SENTRA PENDIDIKAN BISNIS AIRLANGGA SAMARINDA</marquee></th>
 </tr>
<th>NIM</th>  <th><input type="text" size="11" name="nim" ></th><br><br>
 </tr>
<th>NAMA</th> <th><input type="text" size="25" name="nama" ></th><br><br>
 </tr>
<th>ALAMAT</th> <th><textarea name="alamat" cols="32" rows="5"></textarea></th><br><br>
 </tr>
<th>JENIS KELAMIN</th>   <th><input type="radio" name="jkel" value="pria">Pria <input type="radio" name="jkel" value="Wanita">Wanita </th><br><br>
 </tr>
<th>AGAMA</th> <th><select name=agama >
<option value="">Pilih</option>
<option value="Islam">Islam</option>
<option value="Katholik">Katholik</option>
<option value="Kristen">Kristen</option>
<option value="Hindu">Hindu</option>
<option value="Budha">Budha</option></select></th>
 </tr>
<th>HOBI</th> <th><select name=hobi ><br><br>
<option value="">Pilih</option>
<option value="Sepak Bola">Sepak Bola</option>
<option value="Badminthon">Badminthon</option>
<option value="Basket">Basket</option>
<option value="Renang">Renang</option></select></th>
 </tr>
     
<th>STATUS</th> <th><input type="radio" name="status" value="Kawin">Kawin <input type="radio" name="status" value="Belum Kawin">Belum Kawin </th><br><br>
 </tr>
<th>JURUSAN</th> <th><select name=jurusan size="1"><br><br>
<option value="">Pilih</option>
<option value="Teknik Informatika">Teknik Informatika </option>
<option value="Manajemen Informatika">Manajemen Informatika </option>
<option value="Sistem Informasi">Sistem Informasi </option>
</select></th>
 </tr>
<th>KETERANGAN</th> <th><textarea name="ket" rows="3" cols="30"></textarea></pre></th>
 </tr>
<th colspan="2"><input type="submit" value="Kirim" name="kirim"></th>
 </tr>

       <tr>
               <th colspan="2"></th>
 </tr>

      </tr>
              <tr>
              <th colspan="2"><h3>BIODATA</h3></th>
      </tr>
              <tr>
               <th colspan="2"></th>
 </tr>

<th colspan="2">
<marquee width="100%" bgcolor="#33ff33" style="font-family:algerian; font-size:24px; color:#cc0000">ARIBHERZI@STUDENT.SPB.AC.ID</marquee>
<p>
<?php
if(isset($_POST['kirim'])){
echo "Nim saya   : ".$_POST['nim']."<br>";
echo "Nama saya : ".$_POST['nama']."<br>";
echo "Alamat Saya : ".$_POST['alamat']."<br>";
echo "Jenis kelamin saya : ".$_POST['jkel']."<br>";
echo "Agama saya : ".$_POST['agama']."<br>";
echo "Hobi saya : ".$_POST['hobi']."<br>";
echo "Status saya : ".$_POST['status']."<br>";
echo "Jurusan saya : ".$_POST['jurusan']."<br>";
echo "Keterangan : ".$_POST['ket']."<br>";

}
?>
</p>
</th>
 </tr>

</table>          
</form>

0 komentar:

Post a Comment