Jump to content
gordonisnz

Help with pagination - w3css

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.


Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...