HVORFOR KAN JEG IKKE SLETTE DISSE COOKIES ?
Jeg skal have nogle værdier fra min db smidt over i nogle cookies. Det går fint nok med den kode jeg har nu.....men når jeg så skal slette den enkelte cookie igen....det kan jeg IKKE !..hvorfor ?***** db to cookie ******
kundenr=11111111
pw=\"xxx\"
sql = \"select * from Costumer where Username=\"&kundenr &\"and Password =\"&\"\'\"&pw&\"\'\"
set rs = conn.execute(sql)
do while not RS.EOF
ordernr = RS(\"Orders\")
RS.movenext
loop
cv=1
sql = \"select * from Orderline where Orders= \"&ordernr
set rs3= conn.execute(sql)
do while not RS3.EOF
cv=cv+1
RS3.movenext
loop
for each thing in Request.Cookies
cook=cook+1
next
i=1
sql = \"select * from Orderline where Orders= \"&ordernr
set rs2 = conn.execute(sql)
do while not RS2.EOF
pid = RS2(\"ProductNr\")
unit = RS2(\"Unit\")
bid = RS2(\"Options\")
ny = RS2(\"Neww\")
if cook =\"\" then
response.cookies(\"pid\"&i) = pid
response.cookies(\"unit\"&i) = unit
response.cookies(\"bid\"&i) = bid
response.cookies(\"ny\"&i) = ny
end if
if not cook=\"\" then
response.cookies(\"pid\"&cook+i) = pid
response.cookies(\"unit\"&cook+i) = unit
response.cookies(\"bid\"&cook+i) = bid
response.cookies(\"ny\"&cook+i) = ny
end if
i=i+1
RS2.movenext
loop
********* Slet cookie *******
z=1
for each thing in Request.Cookies
if request.cookies(\"pid\"&z) = pid then
response.cookies(\"pid\"&z) = \"\"
response.cookies(\"unit\"&z) = \"\"
response.cookies(\"bid\"&z) = \"\"
response.cookies(\"pid\"&z).expires = \"Jan 1, 1999\"
end if
z=z+1
next