title: Using post array data to create multiple forms that have to be actioned singularly
body: <p>I am making a training course signoff page.</p>
  
  <p>I am submitting a list of users and documents that have attended and been trained. Now i wish to make a signoff page for each user (from post data) that attended.</p>
  
  <p>I would like to create a form that shows the user and requests their password to continue. (this will submit a mysql query into the db), if there are more users in the post data then to produce a form for the next person to sign, and so on until all users in the post data array have completed. Then return to a standard page once all have completed. (or skipped). I would like the ability to skip a user and move to the next if they decide not to sign.</p>
  
  <p>I have tried a number of loops, and foreach and used hidden inputs to see if i can cycle through users, however after the first one i always seem to come unstuck.</p>
  
  <pre><code>    &lt;?php if(isset($_POST['submit'])){ ?&gt;&lt;div class="card-box"&gt;
   &lt;?php
   $posttrainer=$_POST['trainer'];
   $postlocation=$_POST['location'];
   $postdatetrained=$_POST['datetrained'];
   $postaddnotes=$_POST['additionalnotes'];
   $posttdocs=$_POST['tdocs'];
   $posttusers=$_POST['tusers'];
   $totaldocs=sizeof($posttdocs); // do not worry about this for now
   $totalusers=sizeof($posttusers); // key factor
  
  for($i=0;$i&lt;$totalusers;$i++){
  $TUSERS=$posttusers[$i];
  print"&lt;input value=".$TUSERS." name='user[]'&gt;&lt;BR&gt;";
  
  
  ?&gt;&lt;form method="post" name="submit" id="" action="gotonextuser.php"&gt; 
  
  &lt;label&gt;User Name:                                       
  &lt;input class="form-control" type="text" size="10" value="&lt;?php echo $TUSERS; ?&gt;" id="trainer" required="true" readonly&gt;&lt;/label&gt; 
  
  &lt;label&gt;Location of Training:                                     
  &lt;input class="form-control" type="text" value="?php echo $postlocation; ?&gt;" id="location" name="location" required="true"&gt;&lt;/label&gt; 
  
  &lt;label&gt;Disclaimer:
  &lt;textarea readonly&gt; Lots of disclaimer text in here&lt;/textarea&gt;
  &lt;input class="form-control" type="checkbox" value="" id="location" name="disclaimer" required="true"&gt;&lt;/label&gt;       &lt;/form&gt;                     
  &lt;?php } ?&gt;  &lt;/div&gt;                                                  
  &lt;?php    
  }
  </code></pre>
  
  <p>In the above example i have posted from a previous sheet:
  4 users as an array. The code above, is looping through each of those (as expected, but all on one page. I want to deal with 1 user, then press submit then see the inputs for the next user, if I press submit i'll insert a sql query to the db and move to user 2, if i press skip ill move to user 2 (without an insert to mysql_db), and so on.</p>