Multiple Tasks on Submit

Results 1 to 4 of 4

Thread: Multiple Tasks on Submit

  1. #1
    Todd Parsons Guest

    Default Multiple Tasks on Submit

    Greetings ASP Gurus... <BR><BR>Quick question that i would love to get some feedback on. I am working with a lot of forms at the moment, and am wondering if its possible to do multiple tasks when a user hits submit, i.e. send the info to a database and send an email all at the same time. Is this done with include statments? If i made a form that submitted to a databse, and one that sent email, could i use the include statement to make it do both? Any suggestions/help would be most appreciated!<BR><BR>-Todd

  2. #2
    Ian Stallings Guest

    Default RE: Multiple Tasks on Submit

    This is possible. You can combine<BR>the functions together in one asp<BR>to write to the database, then when<BR>it&#039s done with that it can send the email.<BR><BR>You dont need to use an include to do this<BR>but you can combine the two scripts using this<BR>method.<BR><BR><BR>So basically send the form to the asp<BR>using the action attribute, then on the<BR>asp page make the script write to the DB,<BR>then send the email afterwards. You can even<BR>(I advise this) build in error handling<BR>IE. if the DB procedure doesn&#039t complete then<BR>do not send the email.<BR><BR>If you have further questions post them here.<BR>hope this helps!

  3. #3
    Todd Parsons Guest

    Default RE: Multiple Tasks on Submit

    Ok cool! glad to know that is possible... <BR>error handling eh? >:) havent got quite that far<BR>yet but that would be excellent to learn - do you have any<BR>resources i could check out on that?<BR><BR>just so i am on the right track here - on sumbit i pass the form to the .asp page which will request all the fields from the form. i am assuming that i can dim all of those and then process into the database and then process to email and then write out that both have succeeded? also - i am using IIS 4.0 for the server, and though i have heard of CDONTS though havent tried it yet - is this the best (when i say best i mean easiest to work with... :) way to use email with ASP?<BR><BR>thanks again for the tips!<BR>-Todd

  4. #4
    Ian Stallings Guest

    Default RE: Multiple Tasks on Submit

    You are on the right track.<BR><BR>Here is a good section on error handling:<BR><BR><BR>CDONTS will work fine for sending email from<BR>asp. It is probably the easiest to use so long as<BR>the SMTP service with the NT option pack has been installed.<BR>If not I would recommend aspfreemail:<BR><BR><BR>for 3 reasons:<BR>1. its free<BR>2. it kicks ***<BR>3. see reason 1

Posting Permissions

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