Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 1

Input.

php

=================================

<form action="output.php" method="post">

<table border="2" cellspacing="0" cellpadding="0">

<tr><th colspan="3">FORM INPUT DATA MAHASISWA</th></tr>

<tr><td>NPM</td><td>:</td><td><input type="text" name="txtnpm" size="20" maxlength="10"></tr>

<tr><td>Nama Mahasiswa</td><td>:</td><td><input type="text" name="txtnama" size="35"


maxlength="25"></tr>

<tr><td>Tahun Masuk</td><td>:</td><td><input type="text" name="txttahun" size="6"


maxlength="4"></tr>

<tr><td>Jenis Kelamin</td><td>:</td><td><input type="radio" name="txtjenis" value="Laki-Laki">Laki-


laki<input type="radio" name="txtjenis" value="perempuan">Perempuan</tr>

<tr><th colspan="3"><input type="submit" name="submit" value="Proses"></th></tr>

Output.php

=================================

<?php

$npm = $_REQUEST['txtnpm'];

$nama = $_REQUEST['txtnama'];

$tahun = $_REQUEST['txttahun'];

$jenis = $_REQUEST['txtjenis'];

?>

<table border="1">

<tr><th colspan="3">Hasil Data Mahahasiswa</th></tr>

<tr> <td>NPM</td> <td><?php echo $npm;?></td> </tr>

<tr> <td><?php echo 'Nama Mahasiswa';?></td> <td><?php echo $nama ;?></td> </tr>

<tr> <td><?php echo 'Tahun Masuk';?></td> <td><?php echo $tahun;?></td> </tr>

<tr> <td><?php echo 'Jenis Kelamin';?></td> <td><?php echo $jenis;?></td> </tr>

</table>

You might also like