title: Jquery submit radio button without reload and
body: <p>So because my experience with jquery is zero i have no idea how to run my mysql script when the form is submitted without reloading a page?
  in short
  form radio button submit --> form sended --> query without reload</p>
  
  <p>My script:</p>
  
  <pre><code>&lt;form id="myForm" method="get"&gt;
      &lt;div class="row"&gt;
          &lt;div class="span4 info1"&gt;
              &lt;section class="widget"&gt;
                  &lt;img src="../bootstrap/img/thumb/0.jpg" width="auto" height="auto"&gt;
                  &lt;?php if ($selectedBg == '0') {
                      echo '&lt;h2&gt;Current one&lt;/h2&gt;';
                  } ?&gt;
  
                  &lt;input type="radio" name="options[]" value="0" onclick="document.getElementById('myForm').submit();"/&gt;
                  Choose Background
              &lt;/section&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;?php
          $checked = $_GET['options'];
          for ($i = 0; $i &lt; count($checked); $i++) {
              $sql = 'UPDATE blog_users SET background = '.$checked[$i].' WHERE username=?';
              $bg = $db-&gt;prepare($sql);
              $bg-&gt;execute(array($session-&gt;username));
          } 
      ?&gt;      
  &lt;/form&gt;
  </code></pre>
  
  <p>So my question is how do I submit my form without reloading the page + running my query?</p>