...

View Full Version : Mutiple Actions in 1 form



Qulor
12-11-2007, 10:43 PM
Hey

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:


javascript:
function submitForm()
{
var myForm = document.myForm;
window.???(????);
}
</script>
<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();" />
</form>

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

felgall
12-12-2007, 12: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum