thechasboi
01-23-2007, 08:32 AM
I have two sites so far that will be sharing folders on the server. I am having trouble with cookies that either do not work or expire prematurely. I have attempted several fixes for this problem but to no avail. I am not sure how difficult this may be but would appreciate some incite to whether I am nuts trying this or not. The reason is obvious why I would like the directories to not be duplicated. If I change one file I would have to make sure I change the others in the other directories. I hope this is not the answer but if it is so be it. Thanks for the reply. I am posting the code In how I attempt to separate the sites. Thanks for the help again.
dim siteLoggingIn
siteLoggingIn = lcase(request.servervariables("SERVER_NAME"))
Sub ValidUser()
'This will allow the user to go to the protected pages
'***Remember whatever you put in this section you have to have logout.asp delete it.***
response.cookies("iv")("Name") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCon") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCom") = DefaultValue(rs("Company"))
response.cookies("iv")("cE") = DefaultValue(rs("email"))
response.cookies("iv")("cP") = DefaultValue(rs("Phone"))
response.cookies("iv").Expires = DateAdd("m",12,Date)
response.Cookies("iv").domain = "www." & siteLoggingIn
'response.Cookies("iv").path = "/"
response.Cookies("ID") = rs("ID")
response.Cookies("ID").domain = "www." & siteLoggingIn
'response.Cookies("ID").domain = ""
response.cookies("iv")("UserName")= strUserName
If Lcase(Request.Form("Remember")) <> "" Then
response.Write("Remember Me")
response.cookies("ID").Expires = DateAdd("m",12,Date)
End If
If Not IsNull(rs("Artist")) Then
response.Cookies("Artist") = rs("Artist")
response.Cookies("Artist").domain="www." & siteLoggingIn
'response.Cookies("Artist").path = "/"
End If
dim siteLoggingIn
siteLoggingIn = lcase(request.servervariables("SERVER_NAME"))
Sub ValidUser()
'This will allow the user to go to the protected pages
'***Remember whatever you put in this section you have to have logout.asp delete it.***
response.cookies("iv")("Name") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCon") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCom") = DefaultValue(rs("Company"))
response.cookies("iv")("cE") = DefaultValue(rs("email"))
response.cookies("iv")("cP") = DefaultValue(rs("Phone"))
response.cookies("iv").Expires = DateAdd("m",12,Date)
response.Cookies("iv").domain = "www." & siteLoggingIn
'response.Cookies("iv").path = "/"
response.Cookies("ID") = rs("ID")
response.Cookies("ID").domain = "www." & siteLoggingIn
'response.Cookies("ID").domain = ""
response.cookies("iv")("UserName")= strUserName
If Lcase(Request.Form("Remember")) <> "" Then
response.Write("Remember Me")
response.cookies("ID").Expires = DateAdd("m",12,Date)
End If
If Not IsNull(rs("Artist")) Then
response.Cookies("Artist") = rs("Artist")
response.Cookies("Artist").domain="www." & siteLoggingIn
'response.Cookies("Artist").path = "/"
End If