Jump to content

Creating pages for comments


onset
 Share

Recommended Posts

Greetings!I'm quite the newbie in web development, have been doing it for about 1,5 months now. I have been working a lot with CSS, PHP, MySql and lately when i've been bored i taddled with the w3schools tutorial for javascript as well. Recently i've been working on a comment system in my local server. I got the whole thing to save the comments in a mysql database(db from this point on) along with the poster info and i got them to display on the page.Now i want to give the comments "pages". How to describe this, i want the comments to switch to page 2 after they reach the maximum number of comments allowed on a single page, and then to page 3 and so on.I've been pondering a lot on how to do this, nothing of my ideas is really automated enough. I was thinking about a way to limit the number of elements in a db table(let's say "comments page 1" table), then after that table fills up it creates a new table and starts storing them there. I did a lot of searching on the net for my problem, but didn't really find anything a like, what i did find tho is proof that my ideas aren't really the best :).So I'm asking here for help and guidance, what would be a really good and automated way to do this? Please share your ways of doing this kind of thing or your ideas on how this would work :)! Thanks in advance!

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
 Share

×
×
  • Create New...