RPL

satuanggara.blogspot.co.id

Monday, December 21, 2015

langkah membuat halaman view pada php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<h2>buku</h2>
<a href="form.php" target="contain" class="tombol" style="float:left;">daftar buku</a>
<a href="buku.php" target="contain" class="tombol" style="float:left;">tambah buku</a>
<a href="jumlah_buku.php" target="contain" class="tombol" style="float:left;">tambah jumlah buku</a>
<a href="kategori.php" target="contain" class="tombol" style="float:left;">kategori</a>
<a href="penerbit.php" target="contain" class="tombol" style="float:left;">penerbit</a>
<a href="pengarang.php" target="contain" class="tombol" style="float:left;">penerbit</a>

<h2>&nbsp;</h2>
<h2>&nbsp;</h2>
<h2>daftar buku</h2>
<table width="80%" border="0">
<?php
include "konek.php";
$r=mysql_query("select *from tbuku order by judul");
$i=1;
while($a=mysql_fetch_array($r)) {
?>
<tr>
<td width="23"><?php echo $i;?></td>
<td width="236"><?php echo $jud=$a['judul'];?></td>
<td width="23"><a href="detil_buku.php?id=<?php echo $a['id'];?>" class="link" target="contain">detil</a></td>
<td width="23"><a href="ubah_buku.php?id=<?php echo $a['id'];?>" class="link">ubah</a></td>
<td width="23"><a href="hapus.php?id=<?php echo $a['id'];?>" onclick="return confirm('apa anda yakin?')" class="link">hapus</a></td>
</tr>
<?php $i++;
}
?>
</table>
</body>
</html>

No comments:

Post a Comment