Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

inserting multiple entries into one cookie

new to js

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

Junior Member

10+ Year Member

joined:Nov 25, 2003
votes: 0

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

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

Junior Member

10+ Year Member

joined:Dec 27, 2002
votes: 0

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.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members