Create a url so users can bookmark Page uses many random includes

Hello,

My website http://fictionalnews.co.uk

Built with php files, it has random articles displayed when refreshed.
If a user wants to find an article they have already seen they would have to refresh the page until it appears again. How can I give each page layout its own value, for each possible layout when refreshed.
basically a user can bookmark the page and come back to it as it was displayed when they saw it rather than it refreshing again.
Eventually I might have 4 headlines all displaying different random headlines which will result in a lot of possible out comes?

thanks

mally

Well, you could use arguments. Like “www.mysite.com/?article1=2,article2=122,article3=123,article4=234”.
You could save four numbers inside your database for their username. Or, a list of let’s say 10 groups of four numbers pointing at 10 different groups of four articles. Add a button to allow going back a group.

Just an idea, but, EVERYTHING is possible, just have to come up with the original idea of the layout.

Hope that helps to get you started…

cant you use the get method so the page is posted in the url like www.website.com?page=76

Yes, you can. If the user doesn’t clear his history. I didn’t think that was what you were asking.
To do that, you could post to yourself updating the four choices.

I would use a hex notation system. say four hex digits (total 65535 items)
so you can quickly check how many articles a user has requested on the bookmarked page

http://mysite.com/index.php?article=0001001a0e7b

as an example, with the above, i can pull all 3 articles, since I can determine articles requested by the length of the key given… Above I have a hex string of 12 characters, or 3 articles (4 character hex string per article).

Sponsor our Newsletter | Privacy Policy | Terms of Service