title: Get checkbox value without page refresh
body: <p>I got a table of checkboxes:</p>
  
  <pre><code>&lt;td&gt;&lt;input id="box" name="box" type="checkbox" value="1" checked /&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input id="box" name="box" type="checkbox" value="2" checked /&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input id="box" name="box" type="checkbox" value="3" checked /&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I want to submit checkbox value when I check or uncheck the box (each one at a time) <strong>Without refreshing</strong> the page to:</p>
  
  <pre><code>if (isset($_GET['box'])) {
     echo "Success!"
  }
  </code></pre>
  
  <p>By far I got this javascript code to check whether the box is checked or unchecked:</p>
  
  <pre><code>function validate(){ 
  if (document.getElementById('box').checked){
      alert("checked") ;
  }else{
      alert("You didn't check it! Let me check it for you.")
  }
  }
  </code></pre>
  
  <p>I want to add AJAX on it, but all the snippet code I try so far didn't fit good with my code. I'll thank for your help.</p>