I am trying to make a script that is effectively a processing PHP script in between two "steps" on a form (that are also separate PHP files). Basically, the data from step1 is taken to an interstitial page where it is processed, database is updated, etc., and then the user will be redirected to step2, but I need to create some POST data that will be sent to step2. I've seen numerous articles here on Stack about this, but they've all recommended using either cURL or a file_get_contents method which seems to be about sending data away to a script for processing and waiting for the answer to come back, which is sort of the opposite of what I want to do. The processing is done - I am now sending POST data to a new page to be used. How can I do this?
I don't think supplying code samples would help in this, but basically, a user's ID from the database was located in step1.php and is passed to step1_save.php via a hidden input field. I now need to be able to relay that again to step2.php via POST (I don't want to make it a GET and stash it in the URL) but the user needs to go to step2.php as part of a redirect. Any thoughts?
This is different than the other questions because of the reasons stated above. I don't want to pull the response in the same script, I just want to redirect the user. $_SESSION does not appear to let me create my own POST values. I want to create some organically, not only recycle ones from the previous script.