can anyone see why this wouldn't write the exp date (2 months away) to the cookie?
__________________________
If Request.Cookies("date") = "" Then
// Store the date in the first position
Response.Cookies("date1")("showDate") = showDate
Response.Cookies("date1")("who") = who
Response.Cookies("date1")("venue") = venue
Response.Cookies("date1")("misc") = misc
Response.Cookies("date1")("id") = id
Response.Cookies("date1").Expires = DateAdd("m", 2, Now())
// This stores the number of the last date entry made
Response.Cookies("date") = "1"
// Else there is already at least one date stored so get the next number
Else
// Increment the date entry counter
Response.Cookies("date") = Request.Cookies("date") + 1
// Store the date in the first position
Response.Cookies("date" & Request.Cookies("date"))("showDate") = showDate
Response.Cookies("date" & Request.Cookies("date"))("who") = who
Response.Cookies("date" & Request.Cookies("date"))("venue") = venue
Response.Cookies("date" & Request.Cookies("date"))("misc") = misc
Response.Cookies("date" & Request.Cookies("date"))("id") = id
Response.Cookies("date" & Request.Cookies("date")).Expires = DateAdd("m", 2, Now())
End If
____________________________
thanks,what does the cookie end up looking like
p.s. sorry for missing this, Dirk - must have missed it in the list.hey no prob. i've been out of town anywho.
the cookie ends up looking like this:
date1
id=25&misc=AMBERS+BIRTHDAY%21%21+AFTER+PARTY+%40+20+Brookside+Drive+Paola%2C+KS%2E+66071+%2F+913%2E221%2E8 228+for+more+details%2E+this+show+is+ALLL+AGES+%245%2E00%2E&venue=GroundWork+Coffee+House&who=Dryline%2C+Evermourn%2C+Moire%2C+TBA&showDate=11%2F19%2F2004
<!-- w --><a class="postlink" href="http://www.sevenfoldtomorrow.com/">www.sevenfoldtomorrow.com/</a><!-- w -->
1024
3413093120
29674905
772759344
29668661
*
the page resides here:
<!-- m --><a class="postlink" href="http://www.sevenfoldtomorrow.com/mindset/new/calendar.asp">http://www.sevenfoldtomorrow.com/mindse ... lendar.asp</a><!-- m -->
if you click on a date you can add it to myCalendar.
Also, is there a way that i can sort the dates when i read them from the cookie. as of now they display in the order written.
thanks,you're using the cookies to maintain a calendar?
Is that right?i guess you could say that. more like a date book.
the idea was they could keep all the shows they wanted to attend on that page for easy ref.
thanks,
bristonAny reason for not using a database?
Cookies can be easily deleted or clear by regular browser maintenance - seems like a touchy resource to use as the basis for an application.
Just an opinion, obviously, but I just can't imagine it being a very reliable resource for that kind of use.its a user specific calendar. i'm using a db to hold the dates already.
instead of each user having to register and create their own account, all they have to click on the add to myCalendar link.
kind of like a myYahoo type deal.
EDIT:
i also plan on telling the user its done using cookies and i'm not that concerned if they come back after deleting their cookies and they get a friendly error message explaining this.
i debated for a few days using a db vs cookies but obviously decided on cookies.
__________________________
If Request.Cookies("date") = "" Then
// Store the date in the first position
Response.Cookies("date1")("showDate") = showDate
Response.Cookies("date1")("who") = who
Response.Cookies("date1")("venue") = venue
Response.Cookies("date1")("misc") = misc
Response.Cookies("date1")("id") = id
Response.Cookies("date1").Expires = DateAdd("m", 2, Now())
// This stores the number of the last date entry made
Response.Cookies("date") = "1"
// Else there is already at least one date stored so get the next number
Else
// Increment the date entry counter
Response.Cookies("date") = Request.Cookies("date") + 1
// Store the date in the first position
Response.Cookies("date" & Request.Cookies("date"))("showDate") = showDate
Response.Cookies("date" & Request.Cookies("date"))("who") = who
Response.Cookies("date" & Request.Cookies("date"))("venue") = venue
Response.Cookies("date" & Request.Cookies("date"))("misc") = misc
Response.Cookies("date" & Request.Cookies("date"))("id") = id
Response.Cookies("date" & Request.Cookies("date")).Expires = DateAdd("m", 2, Now())
End If
____________________________
thanks,what does the cookie end up looking like
p.s. sorry for missing this, Dirk - must have missed it in the list.hey no prob. i've been out of town anywho.
the cookie ends up looking like this:
date1
id=25&misc=AMBERS+BIRTHDAY%21%21+AFTER+PARTY+%40+20+Brookside+Drive+Paola%2C+KS%2E+66071+%2F+913%2E221%2E8 228+for+more+details%2E+this+show+is+ALLL+AGES+%245%2E00%2E&venue=GroundWork+Coffee+House&who=Dryline%2C+Evermourn%2C+Moire%2C+TBA&showDate=11%2F19%2F2004
<!-- w --><a class="postlink" href="http://www.sevenfoldtomorrow.com/">www.sevenfoldtomorrow.com/</a><!-- w -->
1024
3413093120
29674905
772759344
29668661
*
the page resides here:
<!-- m --><a class="postlink" href="http://www.sevenfoldtomorrow.com/mindset/new/calendar.asp">http://www.sevenfoldtomorrow.com/mindse ... lendar.asp</a><!-- m -->
if you click on a date you can add it to myCalendar.
Also, is there a way that i can sort the dates when i read them from the cookie. as of now they display in the order written.
thanks,you're using the cookies to maintain a calendar?
Is that right?i guess you could say that. more like a date book.
the idea was they could keep all the shows they wanted to attend on that page for easy ref.
thanks,
bristonAny reason for not using a database?
Cookies can be easily deleted or clear by regular browser maintenance - seems like a touchy resource to use as the basis for an application.
Just an opinion, obviously, but I just can't imagine it being a very reliable resource for that kind of use.its a user specific calendar. i'm using a db to hold the dates already.
instead of each user having to register and create their own account, all they have to click on the add to myCalendar link.
kind of like a myYahoo type deal.
EDIT:
i also plan on telling the user its done using cookies and i'm not that concerned if they come back after deleting their cookies and they get a friendly error message explaining this.
i debated for a few days using a db vs cookies but obviously decided on cookies.