Hello. Thank you for taking the time to read my questions.
I am in a state of confusion at this point on a certain function I wish to implement in the shopping cart I am programming. I have looked everywhere on Google for the answer but have found none.
I have a basic database table that looks like this,
Products
[table]
[tr]
[td]ID[/td]
[td]Name[/td]
[td]Categories[/td]
[/tr]
[tr]
[td]1[/td]
[td]Demo Product[/td]
[td]1,2[/td]
[/tr]
[tr]
[td]2[/td]
[td]Demo Product #2[/td]
[td]3,4[/td]
[/tr]
[tr]
[td]3[/td]
[td]Demo Product #3[/td]
[td]3,4[/td][/tr]
[tr]
[td]4[/td]
[td]Demo Product #4[/td]
[td]1,2,3[/td][/tr]
[tr][td]
[php]$CatID = $_GET[‘catid’];[/php]
The column I am looking at is the categories column. Basically I need to get the category id’s based on the $CatID variable. Example,
Demo Product #4
Http://www.Example.com/category/?CatID=1
Http://www.Example.com/category/?CatID=2
Http://www.Example.com/category/?CatID=3
Each link display the product within that category, because Demo Product #4 CategoryID’s are 1,2,3.
So to clarify exactly what needs to happen. When the user goes to a certain category page regardless of the CategoryID he or she will be able to view the products with the CategoryID’s associated with that category.
I hope someone can help me with this issue. If you have any questions regarding any additional information please let me know, but all I am trying to achieve is to gather the product CategoryID’s and display the products to the correct $CatID when presented.
- Travis[/td][/tr][/table]