Hi, I have a problem with posting from an asp page to a database.I have absolutely no asp experiencing, but heres the setup. I have an asp page (forms.asp) with a form that post to another page(insert.asp) whose only purpose is to email me what was in the form. However, i also want it to post the data into a database. Currently it does this [ response.Redirect(''thankyou.asp") ]. Is there a function someone can tell me about that would also post the data to a database? Thank you very much~!
I have a working setup that posts your form to ODBC, but does not send an email. You may be able to incorporate it in to your set up? <% Response.Buffer = true dim cnn,rst set cnn = Server.CreateObject("ADODB.Connection") set rst = Server.CreateObject("ADODB.RecordSet") cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=D:\home\sites\thingy.com\htdocs\_hide\thingy.mdb;" sqltext = "SELECT * FROM tbl1" rst.Open sqltext,cnn,3,3 rst.AddNew rst("t1") = Request.Form("t1") rst("t2") = Request.Form("t2") rst("t3") = Request.Form("t3") rst("r1") = Request.Form("r1") rst("st") = Request.Form("st") rst.update rst.Close Set rst= Nothing cnn.close Set cnn= Nothing %>
You can find at codervods.com/Default.aspx?mode=default&category=Databases&days=All¤tIndex=0 some examples that might help you out.