PDA

View Full Version : cookie problems


esthera
01-19-2006, 07:13 PM
I have the following code on login


session("Admin")="ok"

response.cookies("admin").Expires=date+365
response.cookies("admin")="ok"

then i have a function called checklogin which does the following:

if session("admin")<>"ok" or request.cookies("admin")<>"ok" then
%>
<!-- session and cookies not ok -->
<%
call loginform
response.end
end if



Now I have code that leave the server (to process credit card) adn is then redirected back to the server. For some reason the session and cookies are not being recognized. I understand the session but why the cookies? From page to page it does work -- it's only if I leave and come back.. Is there somethign wrong with my code

BaldEagle
01-19-2006, 09:33 PM
Try:

DateAdd("d",365,Date)

or

DateAdd("yyyy",1,Date)

BaldEagle

Bullschmidt
01-24-2006, 12:12 AM
Now I have code that leave the server (to process credit card) adn is then redirected back to the server. For some reason the session and cookies are not being recognized. I understand the session but why the cookies? From page to page it does work -- it's only if I leave and come back.. Is there somethign wrong with my code


If you're leaving the server perhaps with a link, then try adding target="_blank" to it so that it opens in a new window and thus the old window still on the site is still there...