Forum Moderators: coopster
I am researching flat file DBs. I know that they are bad, but a client i am working for does not have access to mysql hosting!
What i need to do is to have a set of special offers (say about 8 different special offers, each one consisting of 5 fields (title, link, description, image, end date)).
Is there a way (either using a php 'random' script or using a flat file or even the explode/implode funcs) to generate a random page to display 2 random special offers?
Thanks for any help peeps! :D
Set up each of the eight offers in a separate .html file and use the PHP "INCLUDE" feature. Have PHP randomly select two of the offers to include.
It would look like:
<?php include 'offer1.html'?>
The HTML code in the offer "pages" should only include what normally goes between <body></body> tags, without the body tag however. The HTML code from the offer pages will be inserted into the PHP page. This has the advantage of allowing each offer to look different.
The other option is to store the offer information in a plain text file (or eight text files). Have the PHP read the information from the text file, select two offers, and then write the HTML.
[edited by: labeler2003 at 9:47 pm (utc) on Feb. 10, 2005]