title: Update row in MySQL with new data from select list PHP
body: <p>I am very new to PHP (this is my first project) everyone at stackoverflow has been a tremendous amount of help.</p>
  
  <p>What I am trying to do is update the status of a lead in mysql when the submit button is pressed. I currently have been able to get the select field to display what is currently in the database. Now when the user presses submit I need it to write that data back to that lead id. Below is the code I have so far.</p>
  
  <pre><code>    &lt;select name="updatestatus" id="updatestatus"&gt;
      &lt;option value="New" &lt;?php if ($lead-&gt;status == "New") echo "selected"; ?&gt; &gt;New&lt;/option&gt;
                  &lt;option value="In Process" &lt;?php if ($lead-&gt;status == "In Process") echo "selected"; ?&gt; &gt;In Process&lt;/option&gt;
                  &lt;option value="Dead" &lt;?php if ($lead-&gt;status == "Dead") echo "selected"; ?&gt; &gt;Dead&lt;/option&gt;              
              &lt;/select&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>    $valuesstatus["status"] = MySQL::SQLValue($updatestatus, MySQL::SQLVALUE_TEXT);
      $where["id"] =  MySQL::SQLValue($cid, MySQL::SQLVALUE_TEXT);    
      $db-&gt;UpdateRows(TABLE_LEADS, $valuesstatus, $where);
  </code></pre>
  
  <p>now if I change the <code>$updatestatus</code> to something static like "New" then it post to the data base no problem. Right now with the <code>$updatesstatus</code> variable I am getting <code>NULL</code> in the db.</p>
  
  <p>Any suggestions you guys have would be appreciated!</p>