<% ' Declaring variables DIM dtitle, dfirstname, dlastname, djobtitle, demail, dcity, dstate, dpostcode, dcountry, dcompany, dcomments, dtype, dcreated, data_source, sql_insert, con ' Receiving values from Form dtitle = Request.Form("ftitle") if Request.Form("ftitle") = "" then dtitle = "none" Else dtitle = Request.Form("ftitle") End if if Request.Form("ffirstname") = "" then dfirstname = "none" Else dfirstname = Request.Form("ffirstname") End if if Request.Form("flastname") = "" then dlastname = "none" Else dlastname = Request.Form("flastname") End if if Request.Form("fjobtitle") = "" then djobtitle = "none" Else djobtitle = Request.Form("fjobtitle") End if if Request.Form("femail") = "" then demail = "none" Else demail = Request.Form("femail") End if if Request.Form("fcity") = "" then dcity = "none" Else dcity = Request.Form("fcity") End if if Request.Form("fstate") = "" then dstate = "none" Else dstate = Request.Form("fstate") End if if Request.Form("fpostcode") = "" then dpostcode = "none" Else dpostcode = Request.Form("fpostcode") End if if Request.Form("fcountry") = "" then dcountry = "none" Else dcountry = Request.Form("fcountry") End if if Request.Form("fcompany") = "" then dcompany = "none" Else dcompany = Request.Form("fcompany") End if if Request.Form("fcomments") = "" then dcomments = "none" Else dcomments = Request.Form("fcomments") End if dtype="contactus" dcreated=(Date & " " & FormatDateTime(Now,4)) data_source = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\database\xpat.mdb") sql_insert = "insert into member (title, firstname, lastname, jobtitle, email, city, state, postcode, country, company, comments, type, created) values ('" & dtitle & "', '" & dfirstname & "', '" & dlastname & "', '" & djobtitle & "', '" & demail & "', '" & dcity & "', '" & dstate & "', '" & dpostcode & "', '" & dcountry & "', '" & dcompany & "', '" & dcomments & "', '" & dtype & "', '" & dcreated & "')" ' Creating Connection Object, opening the database and insert record Set con = Server.CreateObject("ADODB.Connection") con.Open data_source con.Execute sql_insert 'sending email to xpat Dim objCDOMail Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.To = "xpat@hbcis.com" 'the destination 'objCDOMail.To = "lauriou@ozemail.com.au" 'the destination objCDOMail.From = demail 'the sender email ' objCDOMail.cc = "info@mydomain.com" 'carbon copy Dim txtBody txtBody = "Hi Helene" & vbCrLf & vbCrLf & "This email was sent automatically from the Contact us page from Xpat." & vbCrLf _ & " " & vbCrLf _ & "Title: " & dtitle & vbCrLf _ & "Firstname: " & dfirstname & vbCrLf _ & "Lastname: " & dlastname & vbCrLf _ & "Job Title: " & djobtitle & vbCrLf _ & "Email: " & demail & vbCrLf _ & "City: " & dcity & vbCrLf _ & "State: " & dstate & vbCrLf _ & "Post Code: " & dpostcode & vbCrLf _ & "Country: " & dcountry & vbCrLf _ & "Company: " & dcompany & vbCrLf _ & "Comments: " & vbCrLf _ & dcomments & vbCrLf _ & vbCrLf _ & "Created: " & dcreated & vbCrLf _ & "To reply to this user, please click on the following mailto:" & demail & vbCrLf _ & " " & vbCrLf _ & "Data from this user has been added to the Xpat database as type contactus" objCDOMail.Subject = "Contact us from Xpat Web Site" 'the subject objCDOMail.Body = txtBody 'the body objCDOMail.Send 'fire off the email ' Done. Close the connection con.Close Set con = Nothing %>

Thank <% if Request.Form("ffirstname") = "" then dfirstname = "" Else dfirstname = Request.Form("ffirstname") End if Response.Write ( dfirstname &" ") %> for contacting us and sending your comments.

We will get back to you as soon as we can.

Thanks again

The Xpat Team

 © Xpat - HBCIS Group - 2003
Email: xpat@hbcis.com || Ph: +61 2 9665-7346 || ABN 34 290 264 563

Privacy Policy