how to submit a form from a php script
Question by elduderino
Possible Duplicate:
Auto Submitting a form (cURL)
I have a form which submits to a php script. In this form I need to collect all the $_POST data and then post this on to another form (the reason for this isn’t really relevant but there is a good reason).
My question is once I’ve collected all the data from the initial form submit, sanitised it and assigned it all to variables how do i then package it all up to send to the next form? The second form is expecting a $_POST with hidden fields with particular name attributes….so how do i do this? do I build the actual html and submit that somehow to the second form or do I buld some sort of array and send that?
hope this makes sense. Kind of hard to put in to words.
Answer by RiaD
Answer by Starx
The better way woudl be to store the sanitized variables in the session.
Collect all the information you need from all the forms you need.
Then after you have all the data needed, then finally update the DB (or Somethign else)