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

No NPM Nama Alamat Jenis Kelamin Umur Jurusan Aksi: Include

This document contains a PHP code to display student data from a database in a table format. The table has columns for student number, name, address, gender, age, major, and action links to delete or edit each student's record. The code connects to a database, queries the student table, loops through the results to output each student's details in a new table row.

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)
17 views

No NPM Nama Alamat Jenis Kelamin Umur Jurusan Aksi: Include

This document contains a PHP code to display student data from a database in a table format. The table has columns for student number, name, address, gender, age, major, and action links to delete or edit each student's record. The code connects to a database, queries the student table, loops through the results to output each student's details in a new table row.

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 <table width="800" border="0" align="center" cellpadding="2" cellspacing="1"

bgcolor="#000000" celpading="2" celspacing="1" >


2 <tr bgcolor="#CCFFFF">
3 <td><div align="center"><strong>No</strong></div></td>
4 <td><div align="center"><strong>NPM</strong></div></td>
5 <td><div align="center"><strong>Nama</strong></div></td>
6 <td><div align="center"><strong>Alamat</strong></div></td>
7 <td><div align="center"><strong>Jenis Kelamin</strong></div></td>
8 <td><div align="center"><strong>Umur</strong></div></td>
9 <td><div align="center"><strong>Jurusan</strong></div></td>
10 <td><div align="center"><strong>Aksi</strong></div></td>
11 </tr>
12 <?php
13
14 include("koneksi.php");
15
16 $tampil="select * from mahasiswa";
17 $qryTampil=mysql_query($tampil);
18 while ($dataTampil=mysql_fetch_array($qryTampil)) {
19 $no++
20 ?>
21
22 <tr bgcolor="#FFFFFF">
23 <td><?php echo $no ; ?></td>
24 <td><?php echo $dataTampil['npm']; ?></td>
25 <td><?php echo $dataTampil['nama']; ?></td>
26 <td><?php echo $dataTampil['alamat']; ?></td>
27 <td><?php echo $dataTampil['jk']; ?></td>
28 <td><?php echo $dataTampil['umur']; ?></td>
29 <td><?php echo $dataTampil['jurusan']; ?></td>
30 <td><div align="center"><a href="delete.php?id=<?php echo $dataTampil['id'] ;
?>">Delete</a> | <a href="Form_edit.php?id=<?php echo $dataTampil['id']; ?>">Edit
</a></div></td>
31
32 </tr>
33 <?php } ?>
34 </table>

You might also like