469,955 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

Problem with cookies (maximum of 20)

Jan
Hello,

I'm builing a webstore with PHP. All products will be stored in a
cookie-array. In the next page people could fill in their name, address etc.
And in the 3rd page they could choose how they will pay. These data will
also be stored in an array. In the 4th page they could see a complete list
of al the information they filled in. I think some of you know my problem:
you could only use 20 cookies, the 21th will overwrite another used cookie.
So in the 4th page there is information missing!!!

How do I store information from different steps/pages of my webpages?

I hope you can understand me. If not, please let me know.
Thanks for your answer!

Jan (from Holland)

Jul 17 '05 #1
2 1600
I'm new to PHP, but can't you use session variables to store the information
instead of cookies? I think that using that many cookies wouldnt really work
too well anyways because a lot of people are running cookie blockers along
with thier popup blockers so your forms might not work at all on some
peoples computers.

"Jan" <do*****@zonnet.nl> wrote in message
news:BD550CFD.18B6A%do*****@zonnet.nl...
Hello,

I'm builing a webstore with PHP. All products will be stored in a
cookie-array. In the next page people could fill in their name, address
etc.
And in the 3rd page they could choose how they will pay. These data will
also be stored in an array. In the 4th page they could see a complete list
of al the information they filled in. I think some of you know my problem:
you could only use 20 cookies, the 21th will overwrite another used
cookie.
So in the 4th page there is information missing!!!

How do I store information from different steps/pages of my webpages?

I hope you can understand me. If not, please let me know.
Thanks for your answer!

Jan (from Holland)

Jul 17 '05 #2
On Fri, 27 Aug 2004 16:08:29 +0200, Jan <do*****@zonnet.nl> wrote:
I'm builing a webstore with PHP. All products will be stored in a
cookie-array. In the next page people could fill in their name, address etc.
And in the 3rd page they could choose how they will pay. These data will
also be stored in an array. In the 4th page they could see a complete list
of al the information they filled in. I think some of you know my problem:
you could only use 20 cookies, the 21th will overwrite another used cookie.
So in the 4th page there is information missing!!!

How do I store information from different steps/pages of my webpages?

I hope you can understand me. If not, please let me know.
Thanks for your answer!


Sessions are certainly worth a look. All the client gets is one cookie with a
unique ID, and the rest of the data is stored on the server (where the client
can't mess with it).

And as another bonus, you can get sessions to work even on browsers that
refuse cookies.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by jensen bredal | last post: by
3 posts views Thread by Joe | last post: by
4 posts views Thread by Brano | last post: by
2 posts views Thread by Griff | last post: by
3 posts views Thread by Simon Dean | last post: by
7 posts views Thread by cmrchs | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.