Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ Language=VBScript %>
- <!--#include virtual="/silpada2/Connections/connGKCCF.asp" -->
- <!--#include virtual="/silpada2/ASP/HOP.asp" -->
- <% 'Response.Buffer = True %>
- <%
- //generates merchant_ref_number based on Epoch time
- function orderNum()
- Dim Date1, Date2, Epoch
- Date1 = "01/01/1970 00:00:00"
- Date2 = Now
- Epoch = DateDiff("s",Date1,Date2)
- orderNum = Epoch
- end function
- //grab the form fields
- dim firstname, middlename, lastname, phone, email, country, amount, order_number, comments
- order_number = orderNum()
- firstname = server.HTMLEncode(Request.Form("customer_firstname"))
- middlename = server.HTMLEncode(Request.Form("customer_middlename"))
- lastname = server.HTMLEncode(Request.Form("customer_lastname"))
- phone = server.HTMLEncode(Request.Form("customer_phone"))
- email = server.HTMLEncode(Request.Form("customer_email"))
- country = server.HTMLEncode(Request.Form("bill_country"))
- amount = server.HTMLEncode(Request.Form("amount")) '
- comments = server.HTMLEncode(Request.Form("comments")) '
- ////////////////////////////////
- //insert values into the DB
- 'insert transaction into database
- Set oConnection = CreateObject("ADODB.Connection")
- oConnection.Open = MM_connGKCCF_STRING
- Set oCommand = CreateObject("ADODB.Command")
- Set oCommand.ActiveConnection = oConnection
- Set oCommand = CreateObject("ADODB.Command")
- Set oCommand.ActiveConnection = oConnection
- dim sql
- sql = "INSERT INTO tblDonations (comments, amount, customer_firstname, customer_lastname, customer_phone, customer_email, order_number) "
- sql = sql & "VALUES ('"& comments &"', '"& amount &"', '"& firstname & "', '"& lastname & "', '"& phone & "', '"& email & "', '" & order_number & "');"
- Response.write(sql)
- oCommand.Execute(sql)
- oCommand.close
- ////////////////////////////////
- %>
Add Comment
Please, Sign In to add comment