Jump to content

Help with pagination - w3css


gordonisnz

Recommended Posts

Hello.


Ive recently joined this forum. a week or so ago I found the W3CSS pages & they are great.




Ive found the HTML / CSS code for pagination, & i thinki want to use it, however I am a bit puzzled.




example:


<li><a href="#">2</a></li>

<li><a href="#">3</a></li>



can anyone advise what else is needed to use this system ? How does my website KNOW if i clicked page 1, page 2, or page 3 ? all the targets point to a hash-tag #


Basically my main site runs on PHP, so i would appreciate any assistance in understanding


a) how the script / website knows what value is selected


B) how to pass this value to a php script as named value. - Eg $page



Also - it would be good if the pagination page be updated to point to a few tutorials. Thank you.


Link to comment
Share on other sites

W3.CSS just changes the appearance of the pagination buttons. The href="#" are example links that don't do anything.

 

Usually for pagination, you will have PHP generate a set of links with query strings attached, such as <a href="?page=1"> or <a href="?offset=20"> and then use the data passed in the $_GET array to query for certain results from a database.

 

There are plenty of pagination tutorials for PHP. https://www.google.ca/?q=php+pagination+tutorial

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...