Please help me I'm trying to get the data from a form into my database
I'm using the following code could someone please tell me why its not working
<Script Language = vbscript RUNAT = Server>
Function NewPartner(cnn, _
Amount, _
Partnership #,_
First Name, _
Last Name, _
Address, _
City, _
State, _
Zip, _
Phone Number, _
Email)
Dim cmd
Dim SQL
SQL = SQL & "(Amount, Partnership #, First Name, Last Name, Address, City, State, Zip, Phone Number, Date Joined)"
SQL = SQL & " VALUES (' "
SQL = SQL & Amount &" ', '"
SQL = SQL & Partnership # &" ', ' "
SQL = SQL & Name & " ', ' "
SQL = SQL & Address & " ', ' "
SQL = SQL & City & " ', ' "
SQL = SQL & State & " ', ' "
SQL = SQL & Zip & " ', ' "
SQL = SQL & Phone Number & " ', ' "
SQL = SQL & Email & " ', #"
SQL = SQL & Cstr(Date()) & "#)"
Set cmd = Create Object ("ADODB.Command")
cmd.CommandText = SQL
cmd.ActiveConnection = cnn
cmd.Execute
NewPartner = True
Exit Function
On Error Resume Next
NewPartner = False
End Function
Dim cnn
Dim str
Dim Amount
Dim First Name
Dim Last Name
Dim Address
Dim City
Dim State
Dim Zip
Dim Phone Number
Dim Email
Amount = Request.Form("amount")
Name = Request.Form("name")
Address = Request.Form("address")
City = Request.Form("city")
State = Request.Form("state")
Zip = Request.Form ("zip")
Phone Number = Request.Form ("areacode")
Email = Request.Form ("email")
Set cnn = Server.CreateObject("ADODB.Connection")
str = "Data Source = partner"
cnn.open str
cnn.Close
</script>