Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $total_fields=24;
  2. //(Im getting the number of total files in a directory with a previous code, so this number can vary)
  3. <form action"second.php" method"post">
  4. $i=1;
  5. while ($i<$total_fields)
  6. {
  7. <input name='field".$i."' type='text' id='field".$i."' />
  8. }$i++;
  9. // submit button and other stuff
  10. </form>
  11.  
  12. $i=1;
  13. $total_fields=24;
  14. while($i<$total_fields)
  15. {
  16. $field.$i= $_POST['field'.$i];
  17. echo $field.$i."<br>";
  18. $c++;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement