Varun Posted March 5, 2010 Share Posted March 5, 2010 i want to make a page that show 10 products if more than 10 products show page 2 to continue like " << 1 , 2 ,3 >> " previous and next page This is my example code <?php $dblink = mysql_connect("localhost","root",""); mysql_query("USE shopping_cart;"); $result = mysql_query("SELECT * FROM product order by pid;"); ?> <table width="800"> <tr valign="top"> <td width="500"> <div style="width:100%; height:500px;"> <table width="100%" border="0" bordercolor="gray" style="border-colllapse:collapse;"> <?php while($p = mysql_fetch_array($result)) { ?> <tr valign="top"> <td width="100" align="center"> <img src="<?php echo $p['img']; ?>" width="125" height="125"> </td> <td> <div class="pd_title"><?php echo $p['product_name']; ?></div> <div class="pd_desc"><?php echo $p['description']; ?></div> <p><a href="<?php echo $p['example']; ?>"><img src="example" width="49" height="33" /></a></td> </tr> <tr><td colspan="2"><hr noshade size="1" color="green"></td></tr> <?php } ?> </table> </td> <td id="cart" align="center" bgcolor="#eeeeff"> </div> </td> </tr> </table> </body> </html> how to can i make a dynamic change page link like product?=1 Please need help badly :'( Quote Link to comment https://forums.phpfreaks.com/topic/194238-how-to-change-page-in-php-dynamicly/ Share on other sites More sharing options...
PravinS Posted March 5, 2010 Share Posted March 5, 2010 Refer this thread, I have post with pagination script http://www.phpfreaks.com/forums/index.php/topic,289203.msg1370548.html#msg1370548 Quote Link to comment https://forums.phpfreaks.com/topic/194238-how-to-change-page-in-php-dynamicly/#findComment-1021887 Share on other sites More sharing options...
Wolphie Posted March 5, 2010 Share Posted March 5, 2010 Also, please use the code BBCode tags when posting code. Quote Link to comment https://forums.phpfreaks.com/topic/194238-how-to-change-page-in-php-dynamicly/#findComment-1021910 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.