I got 2 forms that submit data to 2 different databases I want to merge the forms into 1 but still work seperately. So 1 submit button but 2 different form methods, for example: <form method="post" action="http://www.url1.com> <form method="post" action="http://www.url2.com> However, both forms have name and email fields, but I want JUST 1 name and email field but I want the data to submit to the 2 seperate databases. So how can I do this, and what would I type. Im a PHP newbie. Please helpe me, thanks
Submit the forst form with a submit button, and use ajax to submit the second one. Use this : http://www.xajaxproject.org/docs/xajax-in-10-minutes.php It's easy. Just look at the forms part.
Thanks bibel but I'm lost lol so confused how to write this. Surely it would be better to just keep it all PHP? Can anyone help me
why not simply merge both forms into 1 and then post the data to a new php page which will sort out which data goes into which database. once that is done, redirect to the page that you want the visitor to see after submission of the form data.