quantumphp wrote:Heres the breakdown
1. I have a list of products stored in a database - each product has it's own ID that auto increments.
I'd like to be able to choose which product shows up on the home page as a featured product.
I've already set it up to pull from the database. Just not sure how to specify the id for the index page since it's coming from a search engine and doesn't have a url id.
So it seems I need to be able to specify which id the home page gets so it knows which product to display.
Thanks
I dont quite understand what is the problem.
To get some data from your DB and put it on your homepage, can this be so difficult.
If you have all data there, then it is just to use PHP to display your stuff.
If there are images, I suppose you have a field in DB with name of image
and a description of your product.
Say you make a 'productview.php'
Now at the page where search/request for a product with ID=77 is being made
and pulled from DB, you can echo 1 or several links:
<a href="productview.php?id=77">Productname</a>
<a href="productview.php?id=78">Productname</a>
In your productview.php one product is presented.
For example id=77 data is SELECTED and all information, images and description displayed.
Including and Using a special template: 'product_tpl.php'