Help with split page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have 50 products , I want to display 10 products per page , if I use LIMIT
, I will make 5 links , but I want the code will make 5 links automatically
for me , I do not know how to do , anyone can help me , thank you

<?
mysql_connect('localhost', '', '');
mysql_select_db("shoppingcart");
$result= mysql_query("select * from produclist where manhom=$xp") ;
$cnt = mysql_num_rows($result);
for ($i = 0 ; $i <= $cnt ; $i++ )
    {
         $row = mysql_fetch_array($result) ;
         echo "<tr><td align=center><img src=".$row["image"]."></td>
                         <td align=center><a
href=details.php?t=".($i).">".$row["name"]."</a></td>
                         <td align=center>".$row['price']."</td></tr>" ;
    }
?>

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux