There's actually no way of submitting a form twice in two action urls
in normal browser's capability. What you can do is that serialize all
your variables into string using serialize() and use AJAX to submit
into two locations one after another. like this

<form action="" id="pform" onsubmit="return submit_my_form();">
<input type="text" name="input1">
<input type="text" name="input2">
</form>
<script language="javascript">

function submit_my_form(){
   $.ajax({
     url : "url1.php",
     type : "post",
     data : $("#pform").serialize(),
     success : function(e){
      // so form is submitted successfully !!
     }
   });

   $.ajax({
     url : "url2.php",
     type : "post",
     data : $("#pform").serialize(),
     success : function(e){
      // so form is submitted successfully !!
     }
   });
   return false;
}

</script>

Hope this helps!!

On Jul 5, 5:18 am, xomero <[EMAIL PROTECTED]> wrote:
> How can i submit a form twice, let say I want to save the form data on
> my database and with the send the same form data to a different script
> in an external host.

Reply via email to