<?php
$koneksi = mysql_connect("localhost", "root", "") or die("Gagal koneksi ke server.");
mysql_select_db("warnas") or die("Gagal membuka database.");
?>
<html>
<head>
</head>
<body>
<tr>
<td><div align="center">
<p><a href="form_user.php">Form User</a> </p>
<table width="800" border="1" align="center">
<tr>
<td width="104" align="center">Id User</td>
<td width="168" align="center">Username</td>
<td width="112" align="center">Level User</td>
<td width="108" align="center">Password</td>
<td width="100" align="center">Email</td>
<td width="95" align="center">Phone</td>
<td width="100" align="center">Address</td>
<td width="95" align="center">Status</td>
<td width="95" align="center">Action</td>
</tr>
<?php
$query = "select * from tb_user";
$hasil = mysql_query($query, $koneksi) or die("Gagal melakukan query.");
while ($buff = mysql_fetch_array($hasil)) {
?>
<tr>
<td><?php echo $buff['id_user']; ?></td>
<td><?php echo $buff['username']; ?></td>
<td><?php echo $buff['level_user']; ?></td>
<td><?php echo $buff['password']; ?></td>
<td><?php echo $buff['email'];?></td>
<td><?php echo $buff['phone'];?></td>
<td><?php echo $buff['address'];?></td>
<td><?php echo $buff['status'];?></td>
<td align="center">
<a href="edit_user.php?id_mobil=<?php echo $buff['id_user']; ?>">Edit</a>
<a href="hapus_user.php?id_mobil=<?php echo $buff['id_user']; ?>">Hapus</a></td>
</tr>
<?php
};
mysql_close($koneksi);
?>
</body>
</html>
Senin, 08 Juni 2015
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar