View Full Version : Mutiple Actions in 1 form

12-11-2007, 11:43 PM

On my website i got a registration form. Works very well with action="..."
But there's one problem. I need to add a second action within the same form!

One will be the registration so action="register.php"
and they other needs to send the data to a second online database

I came up with something like:

function submitForm()
var myForm = document.myForm;
<form name="Registration" action="register.php">
<input type="text" name="username" /><br />
<input type="password" name="password" /><br />
<input type="button" value="Submit" onClick="submitForm();" />

I don't know what to put on the ???

12-12-2007, 01:48 AM
The usual way to handle a form that needs to perform two (or more) tasks is to set up the one action to do everything. If necessary you can have the called script perform the first action and then pass the form values to a second script to perform the second action.