Jump to content

How to change page in php dynamicly?


Varun

Recommended Posts

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  :'(  :-[

Link to comment
https://forums.phpfreaks.com/topic/194238-how-to-change-page-in-php-dynamicly/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.