Re: Help PleaseFrom Thomas on 15 June '00
replying to Re: Help Please posted by David A
>>I am actually having a nightmare trying to do this so I thought I would post this to see if anyone out their can help.
>>I am trying to create a "Your Path" on my site so that users can view where they have been and for ease of navigation.
>>An example would be
>>Your Path: Home : categories : amino acids
>>The problem I am running into is that my site is using ASP w/ VB script. My products are all stored in a database and I dont know how to call the product or the category that the product is in (especially making it a link). Any code or insight would be extremley appreciated.
>Not sure if I understand the question but I'll try an answer anyway.
>I'm coming from a PHP background on this but the principles are probably the same.
>First create a column in the database which contains the category which that product is in. That way you can search and index according to the category.
>As far as linking. Have an IF/ELSE loop which sends a query to the database based on the variables passed to the page.
>OK that wasn't very clear.
>lets assume your page is called products.asp.
>On that page you have code like: (not actual code)
>IF category=1 then database query = return everything with cateory 1.
>ELSEIF category=2 then database query = return everything with cateory 2.
>Calling this url 'products.asp?category=1' would result in product 1 categories being displayed. 'products.asp?category=2 would show category 2 items.
>Basically the results returned by the database is determined by an IF loop which is passed variables via the URL. Hopefully that remotely makes sense.
Ok yes that makes sense, but I am having a hard time actually writing the link. Here is the problem more exact.
Say I am at the home page, I then go to a category and in that category, I click on a product, I then need to be able to create a link to go back to the category. All the products and cetegories are stored in a databse.
It might make more sense to view the site I am working on.. it is www.vitamins-etc.com
Any help is much appreciated. Thanks for the other insight by the way.