I want to carry the forum login over to new pages I'm writing; I'm using the forum and it's db as a starting point for a site with articles and comments.
I searched here and couldn't find the info I needed but this script got it for me:
<% Dim x,y
For Each x in Request.Cookies Response.Write("<p>") If Request.Cookies(x).HasKeys Then For Each y in Request.Cookies(x) Response.Write(x & ":" & y & "=" & Request.Cookies(x)(y)) Response.Write("<br />") Next Else Response.Write(x & "=" & Request.Cookies(x) & "<br />") End If Response.Write "</p>" Next %>
Having gotten the cookie name and the key (request.cookies("Snitz00User")("Name")) with the script above then I saw that I can put the User ID primary key into a new table field as needed with something like this:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open server.mappath("/snitz_forums_2000.mdb")
set rs = Server.CreateObject("ADODB.recordset") rs.Open "SELECT MEMBER_ID FROM FORUM_MEMBERS WHERE M_NAME='" & strUserName & "'", conn
do until rs.EOF for each x in rs.Fields Response.Write(x.name) Response.Write(" = ") Response.Write(x.value & "<br />") next Response.Write("<br />") rs.MoveNext loop
rs.close conn.close %>
Here's how to get a unix timestamp as used in the forum: