title: Post php form jquery ajax
body: <p>i have form with input field generated from loop, ie</p>
  
  <pre><code>&lt;form name="" method='post' action=''&gt;
  &lt;?php
  for($i=0;$i&lt;10;$i++){
   echo "&lt;input type='text' name='data[]' class='data_cls' value='".$i."'&gt;";
  }
  ?&gt;
  &lt;input type='submit' id='btn' value='save'&gt;
  </code></pre>
  
  <p>i want to submit the form using jquery ajax.</p>
  
  <pre><code>$('.btn').click(function(){
  
              var datString = "HOW TO GET THESE VALUES";
  
              $.ajax({
              url: "data_process.php",
              type: "post",
              data: dataString,
              success: function(data) {
                  alert('OK');
              }
          }); 
  
      });
  </code></pre>