rejordan
Starting Member
18 Posts |
Posted - 02 July 2003 : 00:51:07
|
Yup, it's possible... Here's a little piece of code that I use to update a calendar from a form submission:
sub InsertRideEntry strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("yourdbgoeshere.mdb")
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strDate = "'" & Request.Form("RideDate") & "'" strTime = "'" & Request.Form("RideTime") & "'" strTitle = "'" & Request.Form("Location") & "'" strDistance = Request.Form("Distance") strEvent = "'" & Replace(Request.Form("Ride Description"),"'","'''") & "'" strCategory = "'" & Request.Form("Category") & "'"
strSQL = "Insert into EVENT (RideDate,RideTime,Title,Distance,Event,Category) Values (" & strDate & " ," & strTime& " ," & strTitle & " ," & strDistance & " ," & strEvent & " ," & strCategory & ")" my_Conn.execute(strSQL) my_Conn.Close End Sub
Put something like that in a seperate .asp document then call it in the .html (or .asp) document that contains the form, something like this:
<form method="POST" action="insertride.asp" ID="Form1">
All you need to do is select the correct table from your forum db and insert the fields you want. You could even update exsisting records if you really wanted to.
I hope this helps... |
Edited by - rejordan on 02 July 2003 00:52:10 |
|
|