OK, I'm converting a page over from ASP to PHP. I have it just about all done... but am having problems with cookies. Everything worked fine in ASP, so I know its not a browser problem, but something going on with PHP.
Basically, it's an order form, and it uses 3 cookie arrays to store information. One for General Info, One for Credit Card Info, and One for Demographic Info.
Right now, I'm just working on the first cookie. After doing a lot of tinkering, I found out my problem is this:
This cookie is an array that needs to store a total of about 35 different entries. They each look something like this:
setcookie('NewApp2003[title]', $_POST[Title]);
The value is loaded into the cookie from the results of a form on a previous page.
If I only do a few, it works fine. But if I do a lot, I don't get all the cookies. What I did, was comment them all out, and add one at a time. At some point, when I add a new cookie to the array, it loses the first one. Then, when I added another, it will drop another from the beginning of the array. I believe I only get about 20 in the array. If I add more than that, it drops the ones from the beginning of the array.
So, instead of ending up with:
NewApp2003[0] - NewApp2003[35]
I get:
NewApp2003[15] - NewApp2003[35]
Why am I losing cookies? Like I said, the same number of cookies were stored in the same way in ASP and it has worked fine.
I may just store everything in the session variables if I can't get this to work...
ARGH!
-Sledgeweb