title: Setting option value from database value Newbie
body: <p>I am trying to use a dropdown list and set the value to the one in the databse. </p>
  
  <p>For example if the database holds "Website" I would want this to be the selected option on the dropdown form.</p>
  
  <p>See below code, I have repeated this for each of my products</p>
  
  <pre><code>if($product['product'] = 'Website'){
  echo"
  &lt;div class='form-group'&gt;
  &lt;label for='mail_message'&gt;Product&lt;font color='red'&gt;*&lt;/font&gt;&lt;/label&gt;
  &lt;select name='product' id='product' class='form-control' required&gt;
  &lt;option value='Website'  selected='selected'&gt;Website&lt;/option&gt;
  &lt;option value='CMS'&gt;CMS&lt;/option&gt;
  &lt;option value='Domain'&gt;Domain&lt;/option&gt;
  &lt;option value='Hosting'&gt;Hosting&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  "; }  
  </code></pre>
  
  <p>When i run this code, i have numerous dropdowns showing with each of my products showing as the selected value for each</p>
  
  <p>Can anyone help? (NB)</p>