Link to home
Start Free TrialLog in
Avatar of elieazzi
elieazziFlag for United States of America

asked on

Add a notification by email.

Hi,

Thank you in advance for your time.  I have a online form on the web, with fields.  The user fill the forms and all the information go to a DB -- Table which is fine and correct.   I'm looking to add a line just to notify the user that an information has been fill, like in Coldfusion CFMAIL to:'user' a user has submit a form, please check the database.

So my question how i'm able to add to this code an emial notification saying a user has submit this form, please see Database.  Anyone know to add this line in ASP . Please advice and thank you.

God bless!

This is the actual code.  I'm looking to add a cfmail but in ASP .
Thank you
Ely.
<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
      Err.Clear

      Set fp_conn =  Server.CreateObject("ADODB.Connection")
      FP_DumpError strErrorUrl, "Cannot create connection"

      Set fp_rs = Server.CreateObject("ADODB.Recordset")
      FP_DumpError strErrorUrl, "Cannot create record set"

      fp_conn.Open Application("orderwork_ConnectionString")
      FP_DumpError strErrorUrl, "Cannot open database"

      fp_rs.Open "Results", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
      FP_DumpError strErrorUrl, "Cannot open record set"

      fp_rs.AddNew
      FP_DumpError strErrorUrl, "Cannot add new record set to the database"
      Dim arFormFields0(23)
      Dim arFormDBFields0(23)
      Dim arFormValues0(23)

      arFormFields0(0) = "Telephone"
      arFormDBFields0(0) = "Telephone"
      arFormValues0(0) = Request("Telephone")
      arFormFields0(1) = "PostalCode"
      arFormDBFields0(1) = "PostalCode"
      arFormValues0(1) = Request("PostalCode")
      arFormFields0(2) = "QuantityEnglish"
      arFormDBFields0(2) = "QuantityEnglish"
      arFormValues0(2) = Request("QuantityEnglish")
      arFormFields0(3) = "QuantityFrench"
      arFormDBFields0(3) = "QuantityFrench"
      arFormValues0(3) = Request("QuantityFrench")
      arFormFields0(4) = "Address_sh"
      arFormDBFields0(4) = "Address_sh"
      arFormValues0(4) = Request("Address_sh")
      arFormFields0(5) = "Title"
      arFormDBFields0(5) = "Title"
      arFormValues0(5) = Request("Title")
      arFormFields0(6) = "City_sh"
      arFormDBFields0(6) = "City_sh"
      arFormValues0(6) = Request("City_sh")
      arFormFields0(7) = "Email_sh"
      arFormDBFields0(7) = "Email_sh"
      arFormValues0(7) = Request("Email_sh")
      arFormFields0(8) = "TotalEnglish"
      arFormDBFields0(8) = "TotalEnglish"
      arFormValues0(8) = Request("TotalEnglish")
      arFormFields0(9) = "TotalFrench"
      arFormDBFields0(9) = "TotalFrench"
      arFormValues0(9) = Request("TotalFrench")
      arFormFields0(10) = "Telephone_sh"
      arFormDBFields0(10) = "Telephone_sh"
      arFormValues0(10) = Request("Telephone_sh")
      arFormFields0(11) = "Fax"
      arFormDBFields0(11) = "Fax"
      arFormValues0(11) = Request("Fax")
      arFormFields0(12) = "Fax_sh"
      arFormDBFields0(12) = "Fax_sh"
      arFormValues0(12) = Request("Fax_sh")
      arFormFields0(13) = "City"
      arFormDBFields0(13) = "City"
      arFormValues0(13) = Request("City")
      arFormFields0(14) = "Email"
      arFormDBFields0(14) = "Email"
      arFormValues0(14) = Request("Email")
      arFormFields0(15) = "Name"
      arFormDBFields0(15) = "Name"
      arFormValues0(15) = Request("Name")
      arFormFields0(16) = "OrderedBy"
      arFormDBFields0(16) = "OrderedBy"
      arFormValues0(16) = Request("OrderedBy")
      arFormFields0(17) = "PostalCode_sh"
      arFormDBFields0(17) = "PostalCode_sh"
      arFormValues0(17) = Request("PostalCode_sh")
      arFormFields0(18) = "OrderedBy_sh"
      arFormDBFields0(18) = "OrderedBy_sh"
      arFormValues0(18) = Request("OrderedBy_sh")
      arFormFields0(19) = "Title_sh"
      arFormDBFields0(19) = "Title_sh"
      arFormValues0(19) = Request("Title_sh")
      arFormFields0(20) = "Address"
      arFormDBFields0(20) = "Address"
      arFormValues0(20) = Request("Address")
      arFormFields0(21) = "Name_sh"
      arFormDBFields0(21) = "Name_sh"
      arFormValues0(21) = Request("Name_sh")
      arFormFields0(22) = "TOTAL"
      arFormDBFields0(22) = "TOTAL"
      arFormValues0(22) = Request("TOTAL")

      FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


      fp_rs.Update
      FP_DumpError strErrorUrl, "Cannot update the database"

      fp_rs.Close
      fp_conn.Close

      Session("FP_SavedFields")=arFormFields0
      Session("FP_SavedValues")=arFormValues0
      Session.CodePage = Session("FP_OldCodePage")
      Session.LCID = Session("FP_OldLCID")
      Response.Redirect "index.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>
ASKER CERTIFIED SOLUTION
Avatar of L00M
L00M
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops, you may want to change that title ;)