Welcome Guest, Not a member yet? Register   Sign In
Basic Cookie Help
#4

[eluser]Jay Turley[/eluser]
Okay, first of all, naming the cookie state_cookie caused me to get the mysterious "Disallowed Key Characters." error message, indicating that name conflicts with another cookie I already have in IE.

Second, I found the following code to work perfectly:

Code:
set_cookie('squig', 'mybutt', '0');

    echo 'Cookie =' . get_cookie('squig');

However when I deleted the third "non-required" parameter, the expiration, the cookie did not work. Try adding the '0' (or however many seconds you want) as the third parameter to set_cookie.


Messages In This Thread
Basic Cookie Help - by El Forum - 04-01-2008, 04:29 PM
Basic Cookie Help - by El Forum - 04-01-2008, 05:56 PM
Basic Cookie Help - by El Forum - 04-01-2008, 06:16 PM
Basic Cookie Help - by El Forum - 04-02-2008, 10:00 AM
Basic Cookie Help - by El Forum - 04-02-2008, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB