Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Store User Email in Cookie
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

beznas
Starting Member

Morocco
23 Posts

Posted - 14 August 2003 :  22:31:18  Show Profile
I have other applications in my site that use email.

I was trying to have the Forum user's email stored in a cookie for later use.

I came up with this, Please check it out and let me know how can I improve it

At the end of inc_header.asp

Add this:
================================================

' ##########COOKIE GET EMAIL FROM DB AND STORE IT IN COOKIE
If Request.Cookies(strUniqueID & "User")("Email") <> "" then
Do nothing
Else
Dim strNameCookie, strEmailCookie
strCookieName = "'" & Replace(strDBNTUserName,"'","''") & "'"

strsql = "select * from [FORUM_MEMBERS]"
strsql = strsql & " WHERE M_NAME LIKE " & strNameCookie

set rs4 = Server.CreateObject("ADODB.Recordset")
rs4.Open strsql, my_Conn, 1, 2
if not rs4.EOF then
strEmailCookie = rs4("M_EMAIL")
Response.Cookies(strUniqueID & "User")("Email") = lcase(strEmailCookie)

End If

rs4.close
set rs4 = nothing
End If
'############ END EMAIL COOKIE ADDON ############
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07