hi everybody
i got this page form some template that shows items in the page with pagination system but i want to keep this method without any pagination i dont want to spilit number of items i just wanna see all of the items that it read from db in the page without any pagination system . please help me here is the code of page
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
include "../../db.php";
?>
<?php
error_reporting(0);
//Rows
$imgRow = '<tr>';
$idRow = '<tr>';
$nn=10; //Number of items, we split this later
$s=mysql_query("SELECT * FROM `products`");
$c=mysql_num_rows($s);
if($c%$nn==0){
$cc=$c/$nn;
}else{
$cc=$c/$nn+1;
}
//$cc : Number of pages
$ss=@$_REQUEST['ss']; //Start position (eg: 6)
$other_tables = "";
if($ss=="" || $ss==null){
$ss = 0; //Set to zero because it is incremented later
}
//Pages
echo "<table border=\"0\" align=\"center\" style=\"text-align:center;\">";
$sql=mysql_query("SELECT * FROM `products` ORDER BY `id` DESC LIMIT $ss,$nn");
$inc = 0;
while($r=mysql_fetch_array($sql)){
$key=$r['id'];
$id=$r['name'];
$img=$r['pic1'];
if($inc == 0){
$imgRow .= "<tr>";
$idRow .= "<tr>";
}
$imgRow .= "<td title=\"مشاهده جزئیات محصول\"><a href=\"showproducts1-details.php?id=$key\" target=\"_self\" ><img src=\"../admin/products/productimages1/$img\" width=\"139\" height=\"122\" border=\"1\" /></a></td>";
$idRow .= "<td><a href=\"showproducts1-details.php?id=$key\">$id</a></td>";
++$inc;
if($inc == 5 || $inc == 12 || $inc == mysql_num_rows($sql)){
//Display Table
echo $imgRow."</tr>";
echo $idRow."</tr>";
echo "</table>";
echo "<br>";echo "<br>";echo "<br>";
//To remove extra table
if(mysql_num_rows($sql) <= 5){
$inc = 11;
}
//Reset
if($inc == 5){
echo "<table border=\"0\" align=\"center\" style=\"text-align:center;\">";
$imgRow = "<tr>";
$idRow = "<tr>";
}
}
}
echo "</table>";
echo "<br>";
?> </td>
</tr>
</table>
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
$j=0;
echo"تعداد صفحات : ";
for($i=1;$i<=$cc;$i++){
echo"<a href=\"showproducts1-1.php?ss=$j\">$i</a>";
echo"|";
$j=$j+$nn;
}
?>
</td>
</tr>
</table>