Jump to content

Recommended Posts

I need some help with creating Pagination for my database. I've been looking for hours for tutorials or some kind of help with this and have found nothing :(

 

I have it set up on this page here http://deliquesce.co.cc/pages/graphics/icons.php

 

And this is the Code I have

<?
//connect to mysql
//change user and password to your mySQL name and password
mysql_connect("****", "****", "***"); 

//select which database you want to edit
mysql_select_db("a3441820_graphic"); 


//select the table
$result = mysql_query("SELECT * FROM `icons` LIMIT 24");


//grab all the content
while($r=mysql_fetch_array($result))
{	
   //the format is $variable = $r["icons"];
   //modify these to match your mysql table columns
  
   $id=$r["id"];
   $iconimg=$r["iconimg"];
   
//display the row
   echo "<img id=icons src=$iconimg></img>";
}
?>

 

This works perfectly fine until I try to combine it with the coding for the pagination. Does anyone know how I can get this to work properly or direct me to a tutorial that will show me how to create a proper display of my MySQL data with the pagination?

Link to comment
https://forums.phpfreaks.com/topic/196724-pagination-for-mysql-database/
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.