I need for my script to create new pages as my thread grows...like what will happen here if enough people reply to this message.
Is there a script posted somewhere for this?
thanks
Printable View
I need for my script to create new pages as my thread grows...like what will happen here if enough people reply to this message.
Is there a script posted somewhere for this?
thanks
Maybe this script? http://www.easyphpscripts.com/?Page=EasyPHPNews
It's a news posting script but it has pagination on the page that displays summaries, which might be suitable for your needs.
Here's one usage example of it: http://demo.jemcon.org/articles_plugin.php
And another: http://www.jemcon.org/news.php
This is called pagination. Try google or http://php-mysql-tutorial.com (see the article on pagination).
Thanks guys.
Pagination - I knew there had to be a word for that.
And thanks Beverleyh for the links
All the pagination samples and examples I find are PHP & MYSql.
Is it possible to do this with PHP & simpleXML?
In MySQL it's easy because you can search for a set of rows from 1-10 or 11-20, etc. In XML it won't be so easy, but you can certainly do it.
The only way that I can think of doing it (since PHP/XML doesn't have a way to search for specific rows) is to loop through until the starting number then output until the stopping number. It's basically the same logic, but less efficient.
You'll also need to count how many rows there are, by the way. (I think count() may do this, but depends on how it's reading the xml.)
I came so close to getting everything I wanted with just xml. Oh well, time to build me a db. Thanks!
It IS possible, but I'm not going to recommend against the database: you will save yourself work in the end (for this, and for every other thing you want to add to it in the future). XML has its uses, but databases are always better for dynamic organization, searching and manipulation.
Out of curiosity, why weren't the following DD scripts mentioned?
http://www.dynamicdrive.com/dynamici...nate/index.htm
http://www.dynamicdrive.com/dynamici...pagination.htm
I read this as actually relating to a forum thread-- thus not really allowing for Javascript.
But if this is for a project that can be done like that, those are very useful. Depends on the setup.
I was pretty sure there was a reason why they weren't mentioned, but wasn't sure, ;).