Forum Moderators: open
Anyone have any ideas where i'm going wrong?
IF Request.Cookies("session") <> "" THEN
all1= Request.Cookies("session")
all= unescape (all1)
MyArray= split(all,"&")
REF=MyArray(0)
QUE=MyArray(1)
END IF
The first time I call the script I get 'Subscript out of range errors' splitting the cookie values. Second time, no errors, everything works fine. Help!
Tell Dixon I said hello and that I'm on to egg. :)
Regarding your problem, It sounds to me like the problem might be with the cookie duration. You must set a cookie duration. Also, I would put a space between the two double quotes on the line
IF Request.Cookies("session") <> "" THEN
Chris
Try these one by one:
1. Try the space between the two double quotes
2. Increase the cookie duration (try using a date)
3. The problem could be that the line:
IF Request.Cookies("session") <> "" THEN
suggests that there is a cookie, when there is not one.
Try
If Not Request.Cookies("session") = " " THEN
Chris