title: PHP How to process a form that has dynamically generated fields?
body: <p>I am trying to process a form which I don't know ahead of time what the form fields will be.  Can this still be done in PHP?</p>
  
  <p>For example I have this html form:</p>
  
  <pre><code>&lt;form method="post" action="process.php"&gt;
       &lt;?php get_dynamic_fields(); // this gets all the fields from DB which I don't know ahead of time what they are. ?&gt;
       &lt;input type="submit" name="submit" value="submit" /&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is what I have in the PHP process file</p>
  
  <pre><code>&lt;?php
  if ( isset( $_POST['submit'] ) &amp;&amp; $_POST['submit'] === 'submit' ) {
       // process form here but how do I know what field names and such if they are dynamic.
  }
  
  ?&gt;
  </code></pre>
  
  <p>Here is a caveat: assuming I can't get the data from the db ahead of time, is there still a way to do this?</p>