Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data no moving over to database or form

Status
Not open for further replies.

Ragol1

Programmer
Oct 25, 2001
315
US
Hi I have a problem
This code below used to work but Im now using it on a larger form, The form I am using has 86 fields as does the database but when I submit it it goes ok, but when I get the email and the database they are both empty, I have used this page below and taken off all but two fields and it still does the same the DB is blank as is the email.

Any ideas?????

Please

dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=D:/Root/sqltext = "SELECT * FROM Eval"
rst.Open sqltext,cnn,3,3

'Server Side form validation to keep our database clean
dim No_Rides,Date_Rides

No_Rides = Request.Form("No_Rides")
Date_Rides = Request.Form("Date_Rides")


rst.AddNew
rst("No_Rides") = No_Rides
rst("Date_Rides") = Date_Rides
rst.update


%>
<%
Dim strNo_Rides



strNo_Rides = request.form(&quot;No_Rides&quot;)


%> <%
Set Mailer = Server.CreateObject(&quot;SMTPsvg.Mailer&quot;)
Mailer.AddRecipient &quot;Nick Daines&quot;, &quot;nick@site.com&quot;
Mailer.FromName = &quot;form&quot;
Mailer.FromAddress= &quot;webmaster@mysite.org&quot;
Mailer.RemoteHost = &quot;mail.mysite.org&quot;
Mailer.Subject = &quot;form&quot;
Mailer.BodyText = &quot;RForm&quot;
Mailer.BodyText = &quot;Rides - &quot; & strNo_Rides
Mailer.BodyText = &quot;DO NOT REPLY TO THIS EMAIL IT WAS AUTO GENERATED&quot;


if Mailer.SendMail then
Response.Write &quot;Form Sent...&quot;
else
Response.Write &quot;Form send failure. Error was &quot; & Mailer.Response
end if
%>
 
Are you using Post or Get in your form?
Try using Post if youre not because there is a limit on the amount of data you can pass using the Get method
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top