Nah. It's pretty straightforward. You don't have to use the get_unique_id function I quoted at the top. It's just the way I create 'em. No variables passed.
The only important addition is the slash (to indicate the server domain default directory) and the domain name itself in the SetCookie function.
Otherwise, most all modern browsers will reject a cookie (under even standard security settings) that does not declare in it's http header that it is being created from the same URL that the browser is currently viewing.
Because, IanK, you can't delete a cookie with a Global session() call...It just deletes the PHP session on the server, not the cookie in the visitors browser. You have to basically "reset" the cookie to nothing and pre-date it to delete it on their end.
Saying you've never failed to set a cookie WITHOUT specifying the domain is like saying you've never been stuck in the mud without ever having left the highway. At any rate, why risk losing a customer when it is such an incredibly easy thing to do anyway?
[ Message was edited by: dirty_shame 02/04/2006 05:21 pm ]
dirty_shame, thanks for your insistence on setting the domain in the cookie. My cookie was acting inconsistently across my site, and it was because no domain was being set. It's a real dirty shame that not even php.net encourages you to do that.
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
You have not yet logged in, or registered properly as a member
You are a member, but no longer have posting rights.
This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.