Jump to content

Multiple pages created from textfile


XeroXer

Recommended Posts

Hi there!
In my guestbook it reads all entrys from a plain textfile.
Now I was wondering if theres any way to make it pages instead of them all in one page.
Like if entrys get over 25 it creates a new page with the other ones.
And if it then get over a total of 50 it ones again creates a new page.
The hard thing is for me to make it not print out the same entrys on every page.
PLease help...
Link to comment
https://forums.phpfreaks.com/topic/17599-multiple-pages-created-from-textfile/
Share on other sites

read all the entries from the file into an array.

Then traverse the array in a loop with limits on(start at and stop at) you will then limit the number of entries displayed. Send these limits via the url (page.php?start=75&stop=100) and you should be fine.

Remember to initialize start and stop incase they are not set!!!!
[u][b]ToonMariner:[/b][/u]
That sounded like a good idea.
All my entrys start with [color=red]"<table"[/color] and end with [color=red]"</table>"[/color].
Can you help me how to do it more step by step?  ???

[u][b]chriscloyd:[/b][/u]
My guestbook is done so that it uses a textfile and not mysql.
Just because all people do not have acces to a mysql database.
So that solution is out of the question...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.