title: Send multiply input field values to php by using ajax POST
body: <p>I am trying to send some dynamically created input field values to PHP to validate them and make some checks in the database in the background. I don't want to use submit form but just check the fields after click a button. </p>
  
  <p>Html:</p>
  
  <pre><code>&lt;input name="clockpick" class="input-mini timeinputfrom" data-format="hh:mm" type="text"&gt;&lt;/input&gt;
  &lt;input name="clockpick" class="input-mini timeinputfrom" data-format="hh:mm" type="text"&gt;&lt;/input&gt;
  &lt;button id="check" class="btn btn-primary"&gt;check&lt;/button&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The input boxes can be dynamically created depending how many are necessary. I get the values into jquery but don't find any possibility to send them via post to php.</p>
  
  <p>Jquery:</p>
  
  <pre><code>$('#submit').on('click', function() {
  
  var inputfield = $('input[name="clockpick"]');
  
   $('input[name="clockpick1"]').each(function( index, element ) {
      console.log( "Wert" + index + ": " + $( element ).val() );          
  });
  
  
  $.ajax({
          type: "POST",
          url: "productiontimevalidate.php",
          data: ????
  
      });
  </code></pre>
  
  <p>How can I send the values / array to PHP?</p>