Request Form
For Each TheStuff in Request.Form("Interests") 'insert code that would process each item response.write TheStuff & "" Next Cookie Info response.write "Simple Cookie: " _ & request.cookies("SampleCookie1") & "
" response.write "Cookie 1 has keys?: " _ & request.cookies("SampleCookie1").HasKeys & "
" response.write "Complex Cookie All: " _ & request.cookies("SampleCookie2") & "
" response.write "Cookie 2 has keys?: " _ & request.cookies("SampleCookie2").HasKeys & "
" response.write "Complex Cookie Part 1: " _ & request.cookies("SampleCookie2")("Part1") & "
" response.write "Complex Cookie Part 2: " _ & request.cookies("SampleCookie2")("Part2") TotalBytes
Response.Write Request.TotalBytes Client Certificate <% Option Explicit Dim conn Dim RSVisitor set conn = server.createobject ("adodb.connection") conn.open "DBName", "sa", "yourpassword" set RSVisitor = conn.Execute("select * from Visitors where SerialNumber = " _ & Request.ClientCertificate("SerialNumber")) If RSVisitor.EOF Then conn.execute "insert into Visitors (SerialNumber) values " _ & Request.ClientCertificate("SerialNumber") Response.Redirect "./config.asp?User=" _ & Request.ClientCertificate("SerialNumber") & "&Type=New" Else Layout = RSVisitor("Layout") FavCat = RSVisitor("FavCat") End If %> Email Form Code <% Option Explicit Dim TheMessage Dim TheFormField For Each TheFormField in Request.Form If TheFormField <> "SendTo" and TheFormField <> "CompleteMessage" _ and TheFormField <> "SubmitButton" Then If Request.Form(TheFormField).Count > 1 Then TheMessage = TheMessage & TheFormField & "(" _ & Request.Form(TheFormField).Count & "): " _ & Request.Form(TheFormField) & chr(13) else TheMessage = TheMessage & TheFormField & ": " _ & Request.Form(TheFormField) & chr(13) end if end if Next Dim ObjMail Set objMail = CreateObject("CDONTS.NewMail") objMail.Send "na@na.com", cstr(Request.Form("SendTo")), _ "New More Info Request", cstr(TheMessage) Set objMail = Nothing %> Data Processor <% Option Explicit Dim TheFields Dim TheValues Dim TheFormField Dim TheQuery For Each TheFormField in Request.Form If TheFormField <> "TableName" and TheFormField <> "CompleteMessage" _ and TheFormField <> "SubmitButton" Then TheFields = TheFields & TheFormField & ", " TheValues = TheValues & "'" & Request.Form(TheFormField) & "', " end if Next TheFields = left(TheFields, Len(TheFields) - 2) TheValues = left(TheValues, Len(TheValues) - 2) Dim conn set conn = server.createobject ("adodb.connection") conn.open "ASPBook", "sa", "yourpassword" conn.execute "insert into " & Request.Form("TableName") _ & " (" & TheFields & ") values (" & TheValues & ")" %> Login Page <% Option Explicit Dim RSUser Dim conn If not isempty(Request.Form("Login")) Then set conn = server.createobject ("adodb.connection") conn.open "ASPBook", "sa", "yourpassword" set RSUser = conn.Execute("select * from C5Login where " _ & "UserName = '" & Request.Form("UserName") & "' and " _ & "Password = '" & Request.Form("Password") & "'") If not RSUser.EOF Then response.cookies("Login")("UserName") = request.form("username") response.cookies("Login")("FavCat") = request.form("FavCat") response.cookies("Login").Expires = "2/2/2002" response.redirect "./welcomeback.asp" end if End If %> Cookie Write <% Option Explicit Dim conn If not isempty(Request.Form("Add")) Then set conn = server.createobject ("adodb.connection") conn.open "ASPBook", "sa", "yourpassword" conn.execute "insert into C5Login (UserName, Password, FavCat) " _ & "values (" _ & "'" & Request.Form("UserName") & "', " _ & "'" & Request.Form("Password") & "', " _ & "'" & Request.Form("FavCat") & "')" response.cookies("Login")("UserName") = request.form("username") response.cookies("Login")("FavCat") = request.form("FavCat") response.cookies("Login").Expires = "2/2/2002" response.redirect "./welcomeback.asp" End If %>