title: Post SELECT element value
body: <p>I use jquery to post data to mysql.</p>
  
  <pre><code> **In settings.php i have this short JS code:**
  
   $("form#submit").submit(function() {
      var fname     = $('#fname').attr('value');
      var lname     = $('#lname').attr('value'); 
      $.ajax({
          type: "POST",
          url: "settings.php",
          data: "fname="+ fname +"&amp; lname="+ lname,
          success: function(){
              $('form#submit').hide();
              $('div.success').fadeIn();
          }
      });
  return false;
  });
  
  
  **And this short php:**
  
  
   if (isset($_POST['fname'])){
          $fname        = htmlspecialchars(trim($_POST['fname']));
             DO SOMETHING....
   }
  </code></pre>
  
  <p>This is the code where the FNAME comes from: (after hit ADD image-button then posted the fname value..)</p>
  
  <pre><code>echo "......
        &lt;form id='submit$i' method='post'&gt;&lt;input type='hidden' name='fname' id='fname' class='text' value='$fm_linkaz'&gt;&lt;/div&gt;&lt;input name='add'type='image' id='add' value='$fm_linkaz' src='s.png'/&gt;&lt;/form&gt;..........";
  </code></pre>
  
  <p>This is work well. But i need a SELECT element, so i changed the code to:</p>
  
  <pre><code> ......
  
     echo "&lt;select name=dropdown_list id='**ONAME**'&gt;&lt;option value''&gt;test&lt;/option&gt;";
     for($i=0; $i &lt; count($myarray); $i++){
     echo "&lt;option value='$myarray[$i]'&gt;$myarray[$i]&lt;/option&gt;";}echo "&lt;/select&gt;";
  
     ......&lt;/form&gt;";
  </code></pre>
  
  <p>This is work well, but i dont know how can i modify the JS code, to post the selected value too.<br>
  Thank u for your help.</p>