Pengisian Formulir dengan menggunakan radio buttom dan checkbox pada php.

Contoh pengisian Formulir dengan menggunakan radio buttom dan checkbox  pada php.

contoh. Nama file. input248.php

Deskripsi:Program menampilkanform inputan Formulir

<html>
<head><title>FORMULIR PENDAFTARAN </title></head>https://fathimah1.wordpress.com/wp-admin/post-new.php
<body>
<body bgcolor=”green”>
<FORM ACTION=”21011248.php” METHOD=”GET” NAME=”input”>
<center><h2><b><blink>FORMULIR PENDAFTARAN MAHASISWA UMK</blink></b></h2></center>
<hr>
A. Nama   : <input type=”text” name=”nama”><br>
B. Tempat Dan Tanggal Lahir :
<select name=”Tempat”>
<option value=”Kota”> Kota</option>
<option value=”Kendari”>Kendari</option>
<option value=”KOnawe”>Konawe</option>
<option value=”Konsel”>Konsel</option>
<option value=”Muna”>Muna</option>
<option value=”Konawe utara”>Konawe utara</option>
<option value=”Raha”>Raha</option>
<option value=”Bau-bau”>Bau-bau</option>
<option valu=”Buton”>Buton</option>
<option value=”Wakatobi”>Wakatobi</option>
<option value=”Bombana”>Bombana</option>
<option value=”Kolaka”>Kolaka</option>
<option value=”Kolaka Utara”>Kolaka Utara<option>
</select>
<select name=”Tanggal”>
<option value=”TanggaL”> Tanggal</option><option value=”1″> 1</option>
<option value=”2″> 2</option><option value=”3″>3</option>
<option value=”4″>4 </option><option value=”5″>5</option>
<option value=”6″>6</option><option value=”7″>7</option>
<option value=”8″> 8</option><option value=”9″> 9</option>
<option value=”10″> 10</option><option value=”11″> 11</option>
<option value=”12″> 12</option><option value=”13″> 13</option>
<option value=”14″> 14</option><option value=”15″> 15</option>
<option value=”16″> 16</option><option value=”17″> 17</option>
<option value=”18″> 18</option><option value=”19″> 19</option>
<option value=”20″> 20</option><option value=”21″> 21</option>
<option value=”22″> 22</option><option value=”23″> 23</option>
<option value=”24″> 24</option><option value=”25″> 25</option>
<option value=”26″> 26</option><option value=”27″> 27</option>
<option value=”28″> 28</option><option value=”29″> 29</option>
<option value=”30″> 30</option><option value=”31″> 31</option>
</select>
<select name=”Bulan”>
<option value=”Bulan”>Bulan </option><option value=”Januari”> Januari</option>
<option value=”Februari”> Februari</option><option value=”Maret”>Maret</option>
<option value=”april”>april </option><option value=”Mei”>Mei</option>
<option value=”Juni”>Juni</option><option value=”Juli”>Juli</option>
<option value=”Agustus”> Agustus</option><option value=”September”> September</option>
<option value=”Oktober”> Oktober</option><option value=”November”> November</option>
<option value=”Desember”> Desember</option>
</select>
<select name=”Tahun”><option value=”Tahun”> Tahun</option>
<option value=”1984 “> 1984 </option><option value=”1985″> 1985</option>
<option value=”1986″> 1986</option><option value=”1987″> 1987</option>
<option value=”1988″> 1988</option><option value=”1989″> 1989 </option>
<option value=”1990″> 1990</option><option value=”1991″>1991</option>
<option value=”1992″> 1992</option><option value=”1993″> 1993</option>
<option value=”1994″> 1994</option><option value=”1995″> 1995</option>
<option value=”1996″> 1996</option><option value=”1997″> 1997</option>
<option value=”1998″> 1998</option><option value=”1999″> 1999</option>
<option value=”2000″> 2000</option><option value=”2001″> 2001</option>
</select><Br>
C. Agama  : <br>
<input type=”radio” name=”Agama” value=”Islam”>Islam<br>
<input type=”radio” name=”Agama” value=”Kristen”>Kristen<br>
<input type=”radio” name=”Agama” value=”Hindu”>Hindu<br>
<input type=”radio” name=”Agama” value=Budha”>Budha<br>
D. Jenis Kelamin :
<input type=”radio” name=”Jenis” value=”Pria”>Pria
<input type=”radio” name=”Jenis” value=”Wanita”>Wanita<br>
E. Alamat : <br>
<textarea name=”Alamat” cols=”40″ rows=”1″></textarea><br>
F. Mata Kuliah yang diminati :<BR>
<input type=”checkbox” name=”matakuliah01″ value=”Open Software”>Open Software<br>
<input type=”checkbox” name=”matakuliah02″ value=”Jaringan Komputer”>Jaringan Komputer<br>
<input type=”checkbox” name=”matakuliah03″ value=”Pemrograman Web”>Pemrograman Web<br>
<input type=”checkbox” name=”matakuliah04″ value=”Basis Data”>Basis Data<br>
<input type=”checkbox” name=”matakuliah05″ value=”Pengelolaan Hardware”>Pengelolaan Hardware<br>
<input type=”checkbox” name=”matakuliah06″ value=”Pemrograman Komputer”>Pemrograman Komputer<br>
<input type=”checkbox” name=”matakuliah07″ value=”Multimedia”>Multimedia<br>
<input type=”checkbox” name=”matakuliah07″ value=”Jaringan Nirkabel”>Jaringan Nirkabel<br>
<h2>Login Untuk Mendaftar</h2><br>
Username : <input type=”text” name=”username”><br>
Password : <input type=”password” name=”password”><br>
<blink><input type=”submit” name=”Input” value=”Masuk”> </blink>
<blink><TD><input type=”Reset” value=”Reset” size=”10%”></TD></<blink>
<center><h2>SELAMAT MENGISI</H2><BR>
</FORM
</body>
</html>

NamaFile : proses248.php
Deskripsi:Program penangananform inputanuntukprogram input02.php

<?php
if (isset($_GET[‘Input’])) {
$nama= $_GET[‘nama’];
echo “<b> Nama </b>  :
<font color =blue><b>$nama</b></font><br>”;
$Tempat = $_GET[‘Tempat’];
echo “<b> Tempat Dan Tanggal Lahir</b> :
<font color = blue><b>$Tempat</b></font>”;
$Tanggal = $_GET[‘Tanggal’];
echo ”  –
<font color = blue><b>$Tanggal</b></font>”;
$Bulan = $_GET[‘Bulan’];
echo ”  –
<font color = blue><b>$Bulan</b></font>”;
$Tahun = $_GET[‘Tahun’];
echo ”  –
<font color = blue><b>$Tahun</b></font><BR>”;
$Agama= $_GET[‘Agama’];
echo “<b> Agama </b>  :
<font color = blue><b>$Agama</b></font><br>”;
$Jenis= $_GET[‘Jenis’];
echo “<b> Jenis Kelamin  </b> :
<font color = blue><b>$Jenis</b></font><br>”;
$Alamat = $_GET[‘Alamat’];
echo “<b> Alamat </b>: “;
echo “<font color=blue><b>$Alamat</b></font><br>”;
echo “<b> Mata kuliah yang diminati</b> :<br>”;
if (isset($_GET[‘matakuliah01’])) {
echo “<font color=blue>></font> ” . $_GET[‘matakuliah01’] . “<br>”;
}
if (isset($_GET[‘matakuliah02’])) {
echo “<font color=blue>></font> ” . $_GET[‘matakuliah02’] . “<br>”;
}
if (isset($_GET[‘matakuliah03’])) {
echo “<font color=blue>></font> ” . $_GET[‘matakuliah03’] . “<br>”;
}
if (isset($_GET[‘matakuliah04’])) {
echo “<font color=blue>></font> ” . $_GET[‘matakuliah04’] . “<br>”;
}
if (isset($_GET[‘matakuliah05’])) {
echo “<font color=blue>></font> ” . $_GET[‘matakuliah05’] . “<br>”;
}
if (isset($_GET[‘matakuliah06’])) {
echo “<font color=blue>> </font>” . $_GET[‘matakuliah06’] . “<br>”;
}
if (isset($_GET[‘matakuliah07’])) {
echo “<font color=blue>> </font>” . $_GET[‘matakuliah07’] . “<br>”;
}
}
$user = $_GET[‘username’];
$pass = $_GET[‘password’];
if ($user == “fatimah” && $pass == “21011248”) {
echo “<h2>Maaf Anda Gagal Dalam Mengisi Formulir Silahkan Untuk Mengulangi Lagi</h2>”;
} else {
echo “<CENTER><h2>Selamat Anda Telah Berhasil Mengisi Formulir Pendaftaran Dengan Baik</h2></CENTER>”;
}
?>

Print out input248.php

print out proses248.php

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s