title: Sending input array via AJAX
body: <p>I've dealt with javascript in the past, but I'm trying to relearn it. For that reason I'd like to come up with a javascript solution without the use of libraries like JQuery.</p>
  
  <p>I've come across several threads, and they have been close but not a perfect match to my situation.</p>
  
  <p>I have a form generated dynamically by PHP, it grabs info from the database, and echoes out all the form inputs. They are all checkboxes representing the entry in the database. Normally I would use name="id[value]" where value is the id of the current entry being looped through.</p>
  
  <p>So I would have something like this:</p>
  
  <pre><code>&lt;input type="checkbox" name="del[1]"/&gt;
  &lt;input type="checkbox" name="del[2]"/&gt;
  &lt;input type="checkbox" name="del[3]"/&gt;
  </code></pre>
  
  <p>When I would post this on form submit, I would just get the value of $_POST['del'] and call it a day. However, I'm trying to send it to a PHP page with an AJAX function so i can perform the functions without changing the page or refreshing.</p>
  
  <p>My question is: How do I get all of the checkboxes(that are checked) and send them to the PHP page so it can understand which ones were checked. My understanding is that this will require some kind of conversion. My first though was to loop through each checked box, and grab its index (or give them all Ids and grab the id) and put it into a string that I could then explode PHP side.</p>
  
  <p>Any thoughts? Thanks, sharf.</p>