I have a page that retrieves product data from a database. I would like to create one .php file with a list of hyperlinks that passes a variable that will return the appropriate data.
For example: When you click on the link for "shirts", all shirt products are retrieved from the database using the same page.
When you click on the link for "jeans", all jean products are retrieve from the database using the same page.
I would think that a variable needs to be passed in some way and sent through a series of if/then statements.
For example: If the "shirt" link is selected then $selectedproduct = "shirts"
If $selectedproducts = "shirts" then retrieve shirt data from the database
I know how to retrieve the data, I just don't know how to pass the variable to tell it what to retrieve. Any suggestions?
Thanks in advantage for any help.