JMair Posted July 30, 2009 Share Posted July 30, 2009 I've been looking for an answer to this and for the most part only found 2+ year old posts with answers of it can't be done. So I'll post the question here, if it can be done you guys will know how. Essentially I want to have a submit button that goes to two separate .php pages (welcome.php and welcome2.php are my examples here.) Here's some script so you have an idea what I'm trying to accomplish. <html> <body> <form action="welcome.php" & "welcome2.php" method="post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/ Share on other sites More sharing options...
lonewolf217 Posted July 30, 2009 Share Posted July 30, 2009 you cannot send a form to two pages simultaneously. you can send it to one, then forward the results onto the second page via session or $_GET Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/#findComment-887184 Share on other sites More sharing options...
Adam Posted July 30, 2009 Share Posted July 30, 2009 Not using standard HTML, it may be achievable with JavaScript though. Why do you actually need to? Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/#findComment-887185 Share on other sites More sharing options...
TeNDoLLA Posted July 30, 2009 Share Posted July 30, 2009 If it is something important or sensitive I wouldn't use JS for it. Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/#findComment-887202 Share on other sites More sharing options...
waynew Posted July 30, 2009 Share Posted July 30, 2009 Sounds a little redundant to me. What are you trying to accomplish because I'm sure that there is a better way to do it. Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/#findComment-887211 Share on other sites More sharing options...
JMair Posted July 31, 2009 Author Share Posted July 31, 2009 I actually don't have a need to do it, I was just wondering if it could be done. I've seen the JS solution, but was curious if it could be done with php. thanks again guys. Topic solved. Quote Link to comment https://forums.phpfreaks.com/topic/168206-solved-submit-1-form-to-2-pages/#findComment-887306 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.