%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'written by boom boom barnett 'pull in the requested data yourname = request("yourname") emailaddress = request("emailaddress") tourname = request("tourname") depmonth = request("depmonth") depday = request("depday") adults = request("adults") children = request("children") hotel = request("hotel") cardtype = request("cardtype") cardnumber = request("cardnumber") expire = request("expire") securitypin = request("securitypin") issuenumber = request("issuenumber") nameoncard = request("nameoncard") billingaddress = request("billingaddress") transfer = request("transfer") errorText = "" if yourname <> "" then set objComm = Server.CreateObject("ADODB.Command") objComm.ActiveConnection=strConnect insertSQL = "INSERT INTO orders (yourname, emailaddress, tourname, depmonth, depday, adults, children, hotel, cardtype, cardnumber, expire, securitypin, issuenumber, nameoncard, billingaddress, transfer, dateadded) " & _ "VALUES ('"&yourname&"','"&emailaddress&"','"&tourname&"','"&depmonth&"','"&depday&"','"&adults&"','"&children&"','"&hotel&"','"&cardtype&"','"&cardnumber&"','"&expire&"','"&securitypin&"','"&issuenumber&"','"&nameoncard&"','"&billingaddress&"','"&transfer&"','"&now&"')" 'response.write insertSQL objComm.CommandText=insertSQL objComm.CommandType=adCmdText objComm.Execute noOfRowsAffected if noOfRowsAffected > 0 then orderaddedtodb = true Else orderaddedtodb = false End If 'send an email to client Dim objMail Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = "orders@stonehengetours.com" objMail.Subject = "Thank you "&yourname&" for your Stonehengetours reservation" objMail.To = emailaddress objMail.Body = "Thankyou "&yourname&" for your Stonehengetours reservation" & vbcrlf&_ "We will be contacting you shortly with more details" & vbcrlf& vbcrlf&_ "Regards, " & vbcrlf&_ "Stonehengetours" objMail.Send 'You must always do this with CDONTS. set objMail = nothing 'send an email to nuHosts Set objMail2 = Server.CreateObject("CDONTS.NewMail") objMail2.From = emailaddress objMail2.Subject = "Order placed for Stonehengetours: " & now objMail2.To = "tours@stonehenge-tours.demon.co.uk" objMail2.cc = "joe@creative-jar.com" emailBody = "A reservation was placed for stonehengetours " & now & vbcrlf emailBody = emailBody & " The details are: " & vbcrlf& vbcrlf emailBody = emailBody & "name: " & yourname & vbcrlf emailBody = emailBody & "emailaddress: " & emailaddress & vbcrlf emailBody = emailBody & "tourname: " & tourname & vbcrlf emailBody = emailBody & "dep month: " & depmonth & vbcrlf emailBody = emailBody & "dep day: " & depday & vbcrlf emailBody = emailBody & "adults: " & adults & vbcrlf emailBody = emailBody & "children: " & children & vbcrlf emailBody = emailBody & "hotel: " & hotel & vbcrlf emailBody = emailBody & "cardtype: " & cardtype & vbcrlf emailBody = emailBody & "cardnumber: " & cardnumber & vbcrlf emailBody = emailBody & "expires: " & expire & vbcrlf emailBody = emailBody & "security pin: " & securitypin & vbcrlf emailBody = emailBody & "issue number: " & issuenumber & vbcrlf emailBody = emailBody & "name on card: " & nameoncard & vbcrlf emailBody = emailBody & "billing address: " & billingaddress & vbcrlf emailBody = emailBody & "transfer check: " & transfer & vbcrlf emailBody = emailBody & "IP address of user: " & Request.ServerVariables("REMOTE_HOST") & vbcrlf if orderaddedtodb then emailBody = emailBody & "Record was successfully stored in online Database for future reference." else emailBody = emailBody & "Warning! Record was NOT successfully stored in online DB." end if objMail2.Body = emailBody objMail2.Send 'You must always do this with CDONTS. set objMail2 = nothing set objComm = nothing formsubmitted = true end if %>
|
|
|
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||