0% found this document useful (0 votes)
29 views1 page

Include: $sqltampil $qrytampil $sqltampil $datatampil $qrytampil

This form allows editing the data of a student by retrieving their information from a database based on their ID and populating form fields with it. The form includes fields for a student's NPM, name, address, gender, age, major, and a submit button to save the updated information.

Uploaded by

cadcam wetech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views1 page

Include: $sqltampil $qrytampil $sqltampil $datatampil $qrytampil

This form allows editing the data of a student by retrieving their information from a database based on their ID and populating form fields with it. The form includes fields for a student's NPM, name, address, gender, age, major, and a submit button to save the updated information.

Uploaded by

cadcam wetech
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1 <form name="form1" method="post" action="edit.

php">
2 <table width="400" border="0" align="center" cellpadding="1" cellspacing="1"
bordercolor="#FFFF99" bgcolor="#FF0000">
3 <tr bgcolor="#FFFFCC">
4 <td height="50" colspan="2"><div align="center">EDIT DATA
MAHASISWA</div></td>
5 </tr>
6 <?php
7 include("koneksi.php");
8
9 $sqlTampil="select * from mahasiswa Where id='$_GET[id]'";
10 $qryTampil=mysql_query($sqlTampil);
11 $dataTampil=mysql_fetch_array($qryTampil);
12 ?>
13 <tr bgcolor="#FFFFFF">
14 <td height="40">NPM </td>
15 <td>:
16 <input name="npm" type="text" id="npm" value="<?php echo $dataTampil['npm'];
?>"></td>
17 </tr>
18 <tr bgcolor="#FFFFFF">
19 <td height="40">Nama </td>
20 <td>:
21 <input name="nama" type="text" id="nama" value="<?php echo
$dataTampil['nama']; ?>"></td>
22 </tr>
23 <tr bgcolor="#FFFFFF">
24 <td height="40">Alamat</td>
25 <td>:
26 <input name="alamat" type="text" id="alamat" value="<?php echo
$dataTampil['alamat']; ?>"></td>
27 </tr>
28 <tr bgcolor="#FFFFFF">
29 <td height="40">Jenis Kelamin </td>
30 <td>:
31 <input name="jk" type="text" id="jk" value="<?php echo $dataTampil['jk'];
?>">
32 <input name="id" type="hidden" id="id" value="<?php echo $dataTampil['id'];
?>"></td>
33 </tr>
34 <tr bgcolor="#FFFFFF">
35 <td height="40">Umur </td>
36 <td>:
37 <input name="umur" type="text" id="umur" value="<?php echo
$dataTampil['umur']; ?>"></td>
38 </tr>
39 <tr bgcolor="#FFFFFF">
40 <td height="40">Jurusan </td>
41 <td>:
42 <input name="jurusan" type="text" id="jurusan" value="<?php echo
$dataTampil['jurusan']; ?>"></td>
43 </tr>
44 <tr bgcolor="#FFFFFF">
45 <td>&nbsp;</td>
46 <td height="50"><input type="submit" name="Submit" value="Simpan"></td>
47 </tr>
48 </table>
49 </form>

You might also like