title: $_POST variable name is variable, how to retrieve?
body: <p>Users of my website can generate a custom form. All the fields are saved in a database with a unique ID. When someone visits the form, the fields 'name' attribute is field*ID*, for example </p>
  
  <pre><code>&lt;p&gt;Your favorite band? &lt;input type="text" name="field28"&gt;&lt;/p&gt;
  &lt;p&gt;Your Favorite color? &lt;input type="text" name="field30"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>After submitting the form, I use php to validate the form, but I don't know retrieve the value of $_POST[field28] (or whatever number the field has).</p>
  
  <pre><code>&lt;?
  while($field = $query_formfields-&gt;fetch(PDO::FETCH_ASSOC))
   {
   $id = $field[id];
  
   //this doesn't work!!
   $user_input = $_POST[field$id];
  
   //validation comes here
   }
  ?&gt;
  </code></pre>
  
  <p>If anybody can help me out, it's really appreciated!</p>