How do I design a database to store quotes online?
Your second option is better, though I'm confused: is that a Quotes table? If so, are those two records the same quote or different quotes? Also, there's no need to store total, you can calculate that when you need it. I'd generally say that calculated values should only be stored if the calculations are very complex and long-running.

Here's a simple table structure for the quotes that might help get you started:


Quotes
------
  quote_id (primary key)
  client_id - so you know who the quote belongs to.
  date - when the quote was generated


Quote_Items
-----------
  quote_item_id (primary key)
  quote_id (foreign key to Quotes.id)
  product_id (foreign key to you products)
  single_item_cost  (copy from products so that if the product price changes the quote won't change)
  quantity (multiply by single_item_cost to get total cost for this quote_item)