Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies collection

Status
Not open for further replies.

mmarkym

Programmer
Mar 23, 2002
54
0
0
US
My code for retreiving checkbox values is

<%

dim iCount

for iCount=1 to request.form("menu").count


response.write request.form("menu")(iCount)

next

%>

How would I set these values to the cookie collection?

something like this I think, but it doesn't work

<%
response.cookies("menu") = request.form("menu").count


%>
 
Code:
<% 
dim iCount

for iCount=1 to request.form("menu").count 
  response.write request.form("menu")(iCount)
  response.cookies("menu")(iCount) = request.form("menu")(iCount)
next
%>


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
OK now how would I test that a cookie exists?

I've tried-

if response.cookies("menu")(iCount) then
response.write "cookie exists"
end if
 
Not positive, but I think there is an array.
Try this...
Code:
for x=0 to uBound(request.cookies("menu"))
  response.write "<br>" & x & " = " & request.cookies("menu")(x)
next

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top