Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.