form with 2 actions

liunx

Guest
hi all, I need help here with my html form action, I am trying to use javascript as well for processing the form. The main problem is: when the user click the submit button, is that possible to process two action at a time?..(1) I need to send the form content to Database via another ASP file, and (2) send the form content to my email. I would like to have those function works when user click the SUBMIT button.<br />
<br />
Please help. <br />
<br />
this is my form HTML code:<br />
<br />
...<br />
<FORM action = "Order.asp" method=POST name=form1><br />
...<br />
<INPUT type="button" value="Submit Order" name=submit1 OnClick="CheckData()"><!--content-->Why don't you do the e-mailing in the Order.asp form just after you've set the data into the database... for example...<br />
<br />
-Create connection<br />
-Do Insert statement based on Request.Form<br />
-Close connection<br />
<br />
-Create Email object<br />
-Load object with Request.Form<br />
-Send Email<br />
-Close Email object<br />
<br />
I've obviously left out steps, but that basic pseudo should work for what you're trying to accomplish!<!--content-->
 
Back
Top