title: Save the values of radio button on change into database using jquery ajax?
body: <p>I have my markup like this. Here you can see I have a form and inside that I have two radio buttons. In the form i don't have any submit button. I want to save the values of radio buttons on change into database. I mean to say when I will select any radio button then its value will be saved into database in ajax.</p>
  
  <pre><code>&lt;form action=""&gt;
  &lt;div class="radio show-options"&gt;
    &lt;label&gt;
      &lt;input type="radio" name="active" id="show_popup" value="1"&gt;
    &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="radio show-options"&gt;
   &lt;label&gt;
      &lt;input type="radio" name="active" id="show_slider" value="0" checked="checked"&gt;
   &lt;/label&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>For me I have the database like this.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `slide_options` (
    `options_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `options_type` varchar(255) NOT NULL,
    PRIMARY KEY (`options_id`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
  </code></pre>
  
  <p>In jQuery I have this piece of code so far.</p>
  
  <pre><code>jQuery('input[type="radio"]').on('click', function() {
      var SelectedValue = jQuery(this).attr("id");
      console.log(SelectedValue);
    });
  });
  </code></pre>
  
  <p>So can someone kindly tell me how to save the values to database using ajax? Any help and suggestions will be really appreciable. Thanks</p>