Welcome to WebmasterWorld Guest from 54.147.20.131

Forum Moderators: open

Message Too Old, No Replies

inserting multiple entries into one cookie

new to js

     

lty83

4:50 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



Hey guys

I have my site setup so that when you order something it pops up a confirm box asking if you would like to add that item to your cart, and then when you click yes or ok it adds a product="prodID" to teh cookie where "prodID" = that products unique ID in the db.

Now here comes the problem, when I try to write multiple entries to that single cookie named product it only shows me the last prodID added, i'm trying to work around this so that the cookie product could contain all the prodId's of any product selected.

Maybe the final outcome the cookie would look like
product=12321,12312,34235,23523 etc etc.

Looked around can't seem to find anything to get me started, like i said i have the confirmbox, and its pulling the id from the db, just not sure how to add more data to the end of a cookie entry.

Any help will be quite appreciated, thanks

HocusPocus

8:10 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



I think you'll need something like
cookiedata = value1~data1¦value2~data2¦value3~data3

so that the cookiedata keeps to one string that contains multiple value/data pairs.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month