gordonisnz Posted August 17, 2016 Share Posted August 17, 2016 Hello. Ive recently joined this forum. a week or so ago I found the W3CSS pages & they are great. http://www.w3schools.com/w3css/default.asp Ive found the HTML / CSS code for pagination, & i thinki want to use it, however I am a bit puzzled. http://www.w3schools.com/w3css/w3css_pagination.asp 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 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 More sharing options...
Ingolme Posted August 17, 2016 Share Posted August 17, 2016 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 More sharing options...
gordonisnz Posted August 17, 2016 Author Share Posted August 17, 2016 Thanks. Since finding this website, i can upload things within 5 mins & it works as expected - except this. I'll use it now.... Thanks... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now