0% found this document useful (0 votes)
32 views

Source Code Input Output

The document contains an HTML form that collects student data including NPM, name, year of entry, and gender. The form posts the data to an output.php file that displays the submitted data in a table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Source Code Input Output

The document contains an HTML form that collects student data including NPM, name, year of entry, and gender. The form posts the data to an output.php file that displays the submitted data in a table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 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