Sending Email Msg, and writing to Database simulta

Results 1 to 2 of 2

Thread: Sending Email Msg, and writing to Database simulta

  1. #1
    Join Date
    Dec 1969

    Default Sending Email Msg, and writing to Database simulta

    Hi,<BR><BR>I am trying to set an Email registration form on a site, I have two scripts (both work seperately) one of which takes the email address entered and sends a confirmation email to the entered address and the other enters the name and email@ in a table in the Database. The trouble I am having is getting these to run at the same time so both actions happen when the user hits submit.<BR><BR>*Any* suggestions are warmly welcome...<BR><BR>Many thanks in Advance,<BR><BR>Dave

  2. #2
    Join Date
    Dec 1969

    Default Should not be too hard to do.

    Keep in mind that nothing really happens simultaneously. Scripts happen one step at a time.<BR>Now, you already have two different scripts that you claim work. Try something like this to make them work together:<BR>&#060;%<BR>script_one request.form("email")<BR>script_two request.form("email")<BR><BR>sub script_one(email_variable)<BR>&#039;your first script here<BR>end sub<BR><BR>sub script_two(email_variable)<BR>&#039;your second script here<BR>end sub<BR>%&#062;<BR>That will pass the email to the sub and the sub will deal with it. then it will pass it to the next sub, and likewise, it will deal with it. You can add more variables like so<BR><BR>&#060;%<BR>script_one request.form("email"), request.form("name"), request.form("address"), request.form("phone") <BR>%&#062;<BR><BR>I hope this helps you!<BR><BR>Edward<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts