$_POST to two PHP pages simultaneously !?
Posted: Thu Jun 23, 2005 10:31 am
Hey everyone,
I have a webpage that is basically a form.
The form spawns a '_new' page which generates a pdf document for printing and is then closed by the user.
I normally do error checking on the webpage by either JS or checking values on the next page, however, this is difficult in this instance as I use a JS 'onSubmit' command to return the user to the homepage on the submission of the form. It appears one cant combine two JS commands on one onSubmit so I cant check errors and forward the page at the same time.
What I need do know is this...
How can I $_POST values to two pages at the same time?
I need to forward 3 or 4 $_POST values to the '_new' window to complete the PDF form and send the same to the home page to ensure the values have been completed (error checking).
I have belted the net looking for a JS solution, but not being a JS wiz in any way shape or form, havent been able to come up with an answer.
Unfortunately this is the only solution I can come up with - double checking. If the value/s are not set in the '_new' page I instantly kill the page and the user is left with an error message on the homepage, hits the 'Back' button and returns to the form - if only I can $_POST them there that is.
I have lost a day and a half on this and am just about at my wits end!
All thoughts and suggestions most welcome - hopefully before I go completely loopy
Regards
Hebbs
I have a webpage that is basically a form.
The form spawns a '_new' page which generates a pdf document for printing and is then closed by the user.
I normally do error checking on the webpage by either JS or checking values on the next page, however, this is difficult in this instance as I use a JS 'onSubmit' command to return the user to the homepage on the submission of the form. It appears one cant combine two JS commands on one onSubmit so I cant check errors and forward the page at the same time.
What I need do know is this...
How can I $_POST values to two pages at the same time?
I need to forward 3 or 4 $_POST values to the '_new' window to complete the PDF form and send the same to the home page to ensure the values have been completed (error checking).
I have belted the net looking for a JS solution, but not being a JS wiz in any way shape or form, havent been able to come up with an answer.
Unfortunately this is the only solution I can come up with - double checking. If the value/s are not set in the '_new' page I instantly kill the page and the user is left with an error message on the homepage, hits the 'Back' button and returns to the form - if only I can $_POST them there that is.
I have lost a day and a half on this and am just about at my wits end!
All thoughts and suggestions most welcome - hopefully before I go completely loopy
Regards
Hebbs