hi

i'm pulling data from a mysql database and displaying it in an html table. my problem is i want to be able to have the information broken into pages so that users dont have to scroll down a page but i'm not sure how to do this. thanks

hi

i'm pulling data from a mysql database and displaying it in an html table. my problem is i want to be able to have the information broken into pages so that users dont have to scroll down a page but i'm not sure how to do this. thanks

You might want to look into pagination...

http://www.vipercreations.com/tutorials.php?cat=PHP&id=19&act=view

Hope that helps...

Member Avatar

Depends on the amount of data you get from the 'pageless' query. You've got 3 main choices:

pure php - just reload with the page_id url
php/js (ajax) - as above but only refresh the data element
js - place batches of data into elements and make then visible/hidden

The js version will work best for smallish amounts of data. However, if other people are updating this data, updates will not be shown unless you use an ajax script. If you are expecting large amounts of data, it doesn't really makes much sense to use ajax, may as well use vanilla flavoured php.