Firstly, I am starting a new thread because I would like to get some new eyes on this problem. I have another thread going, but it is getting long, drawn out and hard to read. With that said, here is my problem:
When I try to set a cookie with this code:
setcookie ("please", "work");
It works. I get the cookie named please, with a value of work.
Variables are not interpolated within single quotes, so you are setting $email to the literal string value '$_POST["email"]', not the value of the post variable. (The '%24_POST%5B%22email%22%5D' you see is just the urlencoded value, which is how the strings have certain characters "escaped".)
You should not have to quote the variables at all when all you want is the value of the variable. The unexpected T_ENCAPSED_AND_WHITESPACE error is because of a quirk in PHP: associative array indexes for an array variable being used within a double-quoted string must not be quoted. What makes this confusing is that when not within a double-quoted string, they need to be quoted. But again, there's no reason to be quoting it in this example.
Assuming you're positive the email value is populated, all I can think is that there's something about it that messes up the urlencoding. If using PHP 5, see what happens with this:
Very nice! One step closer! So I tried that with one cookie named 'email' and sure enough it worked. So, after taking one or two victory laps around my room, I sat back down to do some copying and pasting to get that code to work with the second cookie I need to set. 'name' to be specific.
As you can see, I'm using PHP 4 still. Well, when I ran that code, I only got one cookie created, and that was of the 'name' variety. It seemed to skip over 'email' entirely. Hopefully this is an easy fix, but I sure don't see what to do. Thanks for any help!