beznas
Starting Member
Morocco
23 Posts |
Posted - 14 August 2003 : 22:31:18
|
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 ############
|
|