title: Using AJAX to pass data to PHP
body: <p>I have a drop down in PHP. I have some fields from database. Now I have an edit button besides that dropdown in which i want to pass the id the of selected option in dropdown! How can I do this?</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;Base INI File&lt;/td&gt;
      &lt;td&gt;
          &lt;select required  name="base_ini_id"  id="base_ini_id" class="form-control"&gt;
              &lt;option value=""&gt;Select&lt;/option&gt;    
              &lt;?php foreach($base as $value) { ?&gt;
                  &lt;option id="emp" class="specialLink" value="&lt;?php echo $value-&gt;base_ini_filename;?&gt;"&gt;&lt;?php echo $value-&gt;base_ini_filename;?&gt;&lt;/option&gt;
              &lt;?php } ?&gt;
          &lt;/select&gt;
      &lt;/td&gt;
      &lt;?php foreach($customs as $custom) ?&gt;
          &lt;td&gt;
              &lt;?php echo btn_edit('customer/upload_ini/edit_ini_old/' . $custom-&gt;id); ?&gt;
          &lt;/td&gt;
          &gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Looks like this :
  <a href="https://i.stack.imgur.com/wO89C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wO89C.png" alt="image"></a>
  As you can see I have a button in a <code>td</code> besides the dropdown and I want to link that to the id of the selected option from dropdown using AJAX or jQuery. I have no knowledge of AJAX, but due to requirement I have to implement this.</p>