Here are 4 options on how to do this (first 3 don't require user action, with the 3rd you can auto-submit, but can let the user see it and submit it manually):
- In 2.php you simply use
include '3.php';
- thus having access to $_POST
in 3.php
- Use stream_context_create
- Use CURL
- Re-generate a form with a submit button.
<form action="3.php" method="POST">
<?php
foreach ($_POST as $key => $value) {
echo "<input type='text' name='{$key}' value='{$value}' />"; // if it's an array, you can serialize it
}
?><input type="submit"></form>
You can now show it to the user, or submit it with javascript.