Getting the product of the day to display in the index page has been a big coding challenge for me. The aim was to get a different random product each day from the 'Product' database, this would be the 'Product of the Day'. I managed to get the random code working so that a random product was selected from my database but it kept changing on page load instead of the same product displaying throughout the day.
I was unable to solve this problem so I have had to compromise and delegate a product to each day of the week. This works just fine and still means that the product of the day is automatically selected, which is what my client requested, it also means that the products can easily be changed if my client wanted to.
This is the PHP code for the Product of the day:
It took a while to sort out the displaying of the product of the day, I am just trying to sort out the positioning of the rosette:
Wednesday, 16 March 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment