Ini untuk
View_Produk.php
<html>
<head><title></title></head>
<body>
<table>
<tr>
<td>Id</td>
<td>Nama Produk</td>
</tr>
<?php
mysql_connect("hostname","user","password");
mysql_select_db("database");
$query= "select * from produk";
$sql= mysql_query($query);
while($data= mysql_fetch_array($sql))
{
echo "<tr>";
echo "<td>".$data['id_produk']."</td>";
echo "<td>".$data['nama_produk']."...<a href='detail_produk.php?id=".$data['id_produk']."'>Detail</a></td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
dan ini Untuk
detail_produk.php
<?php
$id= $_GET['id'];
$query= "select * from produk_detail where id_produk='$id'";
$sql= mysql_query($query);
$data= mysql_fetch_array($sql);
echo $data['detail'];
?>