title: setting session variables into drop down menu selected item
body: <p>I have a php drop down which populates from mysql</p>
  
  <p>When a user selects a drop down item, i would like to store this selected value in a session variable</p>
  
  <p>The reason for doing this is, that i need to call this session variable to dynamically update second drop down based the previous selection..</p>
  
  <p>how can i do this?
  Thanks,</p>
  
  <pre><code>while ($row2 = mysql_fetch_assoc($result2))
                                              {
                                              echo '&lt;option value="' . $row2['subject_id'] . '"&gt;' . $row2['subjectname']. '&lt;/option&gt;';
                                              }
                                              echo '&lt;/select&gt;';
  </code></pre>