<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> ClearSKY User Input <% 'declare your variables Dim latitude, longitude, acreage, croptype, startburn, endburn, email Dim ConnString, con, SQL 'Receiving values from Form, assign the values entered to variables latitude = Request.Form("latitude") longitude = Request.Form("longitude") acreage = Request.Form("acreage") croptype = Request.Form("croptype") startburn = Request.Form("startburn") endburn = Request.Form("endburn") email = Request.Form("email") 'define the connection string, specify database 'driver and the location of database 'ConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("CEREOnewmembers.mdb") 'declare SQL statement that will query the database 'SQL = "INSERT into newmemberlist (latitude, longitude, acreage, croptype, startburn, endburn, email) values ('" & latitude & "', '" & longitude & "', '" & acreage & "', '" & croptype & "', '" & startburn & "', '" & endburn & "', '" & email & "')" 'create an ADO connection object Set con = Server.CreateObject("ADODB.Connection") 'Open the connection to the database 'con.Open(ConnString) 'execute the SQL 'con.execute(SQL) ' Creates a text file on the server with the email address as the file name ' file_being_created= email & ".txt" file_being_created= "CLEARSKYinput.txt" ' create a file system object set fso = createobject("scripting.filesystemobject") ' create the text file - true will overwrite any previous files Set act = fso.CreateTextFile(server.mappath(file_being_created), true) ' Writes the output to a .txt file in the same directory act.WriteLine(latitude) act.WriteLine(longitude) act.WriteLine(acreage) act.WriteLine(croptype) act.WriteLine(startburn) act.WriteLine(endburn) act.WriteLine(email) ' close the object act.close response.write "The form information was submitted successfully." response.write "

" response.write "Latitude: " & latitude response.write "
" response.write "Longitude: " & longitude response.write "
" response.write "Acreage: " & acreage response.write "
" response.write "Crop Type: " & croptype response.write "
" response.write "Start Burn: " & startburn response.write "
" response.write "End Burn: " & endburn response.write "
" response.write "Your email: " & email response.write "

Return to the map" 'Done. Close the connection object 'con.Close 'Set con = Nothing %>