Skip to main content
Participant
September 14, 2010
Question

How to Load Values From Database on page load?

  • September 14, 2010
  • 1 reply
  • 403 views

I am sure this is easy but... I have a website that lists products similar to the way Amazon lists them. Each product is listed in a separate HTMP table cell complete with Product Name, Desciption, Image and Pricing. Any given product will appear on many different pages within the website. I have a mysql dtabase that has columns that define the primary key, the Product Name, the Product Description and Pricing. I was hoping to use the Dremaweaver Recordset to load the correct pricing and product description for each product on any given web page at the time the page is loaded by the user. Surely I must be able to run an SQL query based on a hiiden vale (e.g. the primary key or name of the product) in order to fill in the correct descriotion and pricing. Am I on the right track or is there a better way to do this? Put another way, how do you load your product data from a database onto a web page without using URL paraneters?

This topic has been closed for replies.

1 reply

September 14, 2010

Yes, you are on the right track. Besides URL parameter you can filter a recordset with a session variable, cookie, or entered value.