title: ACF Repeater Field in an HTML Contact Form
body: <p>I have created a contact form in which fields are generated via an ACF repeater field in my custom post type.</p>
  <p>I can get the rest of the form to send however im not sure how to go about the PHP side of things to submit the repeater fields?</p>
  <p>here's what I have so far:</p>
  <p>HTML:</p>
  <pre><code>&lt;label for=&quot;&lt;?php the_sub_field('product_name'); ?&gt;&quot;&gt;&lt;?php the_sub_field('product_name'); ?&gt; ($&lt;?php the_sub_field('product_price'); ?&gt;)&lt;/label&gt;
  &lt;input id=&quot;&lt;?php the_sub_field('product_name'); ?&gt;&quot; type=&quot;number&quot; name=&quot;&quot; value=&quot;0&quot; /&gt;
  </code></pre>
  <p>PHP:</p>
  <pre><code>&lt;?php
  // Get data
  $orderbusin = $_POST[“orderbusin”];
  $ordercontac = $_POST[“ordercontac”];
  $orderemail = $_POST[“orderemail”];
  $ordernumber = $_POST[“ordernumber”];// Database connection
  $conn = mysqli_connect(“Database Host”,”Database Username”,”Database Password”,”Database Name”);
  if(!$conn) {
  die(‘Problem in database connection: ‘ . mysql_error());
  }// Data insertion into database
  $query = “INSERT INTO ‘Database Name’.’Table Name’ ( ‘orderbusin’, ‘ordercontac’, ‘orderemail’, ‘ordernumber’ ) VALUES ( $orderbusin, $ordercontac, $orderemail, $ordernumber )”;
  mysqli_query($conn, $query);// Redirection to the success page
  header(“Location: http://example.com/thank-you-for-your-order/“);
  ?&gt;
  </code></pre>