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
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!!!!
Link to comment
Share on other sites

[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...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • 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.