Hello,
I wonder how to create the page view. For example I would like to show only 5 rows or 10 rows of the columns.
http://www.masterlink.co.id/product_manager.jpg
product.php
<?php
include('../includes/koneksi.php');
//Hapus berita // undefined index: mode
//echo $id;
if (!empty($_REQUEST['id']) && !empty($_REQUEST['mode']) && $_REQUEST['mode'] == "delete")
{
$id = $_REQUEST['id'];
$result = mysql_query("DELETE FROM gallery WHERE id =".$id) or die(mysql_error());
$confirmation = !$result ? "Gagal menghapus data." : "Data telah terhapus.";
}
?>
<div align="center">
<div style="width:700px;text-align:left;padding-top:5px;">
<?php if (isset($confirmation)) { echo $confirmation; } ?>
<form method="get" action="<?php $_SERVER['PHP_SELF'] ?>">
<br/>
<a class="topLink" href="input_image.php">Product baru >></a><br><br>
<?php
//LOAD NEWS
$result = mysql_query("SELECT * FROM gallery") or die(mysql_error());
?>
<td>Show<select name="lokasi">
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
</select></td>entries<br><br>
<table id="admintable" border="1" cellpadding="2" cellspacing="0">
<tr>
<th></th><th>Product Name</th><th>Lokasi</th><th>Description</th><th>Url Images</th><th>Action</th>
</tr>
<?php
$i=0;
while ($data = mysql_fetch_array($result)){
$result2=($i%2)?'#DFA09D':'white';
echo "<tr bgcolor='$result2'>";
echo '<td><input type="checkbox" name="vehicle" value="Bike"></td>';
echo '<td>'.$data['productname'].'</td>';
echo '<td>'.$data['location'].'</td>';
echo '<td>'.$data['description'].'</td>';
echo '<td>'.$data['urlimages'].'</td>';
echo '<td><a href="product.php?mode=delete&id='.$data['id'].'">Hapus</a> |<a href="input_image.php?id='.$data['id'].'">Edit</a></td>';
echo '</tr>';
$i++;
}
?>
</table>
<br>
<tr>
<td><select name="lokasi">
<option value="Show">Show</option>
<option value="DoNotShow">Do Not Show</option>
<option value="Delete">Delete</option>
</select></td>
<td><input type="submit" name="ok" value="Apply"/></td>
</tr>
</form>
</div>
</div>
</center>
</div>
</div>