Loop $POST Array and store in form hidden fields


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. form id="solarrechner" name="solarrechner" action="index.php" method="POST">
  2. <?php
  3. foreach($_POST as $key => $value) {
  4. echo '
  5. <input type="hidden" name="' . $key . '" value="' . $value . '">
  6. ';
  7. }
  8. ?>
  9. </form>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.