product_preview.php
<h2><center>Product Preview</center></h2>
<p> <form method = "post" action = "product_edit.php" >
<p> <input name="tambah_produk" type="button" value="Tambah Produk" /> </p>
</form>
<table border="1" cellpadding="2">
<tr>
<td>No </td>
<td>Nama Produk</td>
<td>Harga</td>
<td>Tgl Masuk</td>
<td>Aksi </td>
</tr>
<?php
include ("includes/koneksi.php");
$i = 1;
$output = mysql_query("SELECT * FROM produk") or die(mysql_error());
while($data = mysql_fetch_array($output)){
?>
<tr>
<td><?php echo $i."</br>";?>
<td><?php echo $data['nama_produk']."</br>";?></td>
<td><?php echo $data['harga']."</br>";?></td>
<td><?php echo $data['tgl_masuk']."</br>";?></td>
<td>
<a href="./product_edit.php?id=<?php echo $data['id_produk'];?>&mode=edit">Edit</a>
<a href="./product_edit.php?id=<?php echo $data['id_kategori'];?>&mode=delete">Delete</a>
</td>
</tr>
<?php
$i++;
}
?>
I wonder why the button does not work. If I press the "Tambah Produk button" nothing happen. It suppose to bring me to product_edit.php page.