Wednesday, June 11, 2008

PHP-script view

<table width="617" border="1">
<tr>
<td width="68">id_pesanan</td>
<td width="72">id_pemesan</td>
<td width="84">id_pegawai</td>
<td width="91">tgl_pesan</td>
<td width="32">lama</td>
<td width="57">id_kamar</td>
<td width="65">id_meeting</td>
<td width="60">total_harga</td>
<td width="96">action</td>
</tr>
<?
$conn = mysql_connect("localhost","root","");
mysql_select_db("basdat",$conn);
$sql = "select * from pesanan order by id_pesanan asc ";
$que = mysql_query($sql);
while ($rs = mysql_fetch_array($que))
{
?>
<tr>
<td><?=$rs['id_pesanan'] ?></td>
<td><?=$rs['id_pemesan'] ?></td>
<td><?=$rs['id_pegawai'] ?></td>
<td><?=$rs['tgl_pesan'] ?></td>
<td><?=$rs['lama'] ?></td>
<td><?=$rs['id_kamar'] ?></td>
<td><?=$rs['id_meeting'] ?></td>
<td><?=$rs['total_harga'] ?></td>
<td>
<a href="s_deletepesanan.php?id_pesanan=<?=$rs['id_pesanan']?>&id_kamar=<?=$rs['id_kamar'] ?>&id_meeting=<?=$rs['id_meeting'] ?>">delete</a>

<a href="updatepesanan.php?id_pesanan=<?=$rs['id_pesanan']?>&id_pemesan=<?=$rs['id_pemesan']?>&id_pegawai=<?=$rs['id_pegawai'] ?>&tgl_pesan=<?=$rs['tgl_pesan'] ?>&lama=<?=$rs['lama'] ?>&id_kamar=<?=$rs['id_kamar'] ?>&id_meeting=<?=$rs['id_meeting'] ?>">update</a>
</td>
</tr>
<?
}
mysql_close($conn);
?>
</table>

</td>
</tr>
</table>

No comments:

Post a Comment