| Welcome to WebmasterWorld Guest from 126.96.36.199 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|How to get the value of a Cookie?|
How to get the value of a Cookie?
| 1:11 pm on Apr 14, 2008 (gmt 0)|
How can i get the Value of a cookie?
Set the cookie:
setcookie("name", "value", time() - 3600);
Read the cookie:
I want to read the value not just the name.
Thanks in advance!
| 1:35 pm on Apr 14, 2008 (gmt 0)|
try this to see what's in the cookie
| 6:21 pm on Apr 14, 2008 (gmt 0)|
$_COOKIE["name"] is the value
| 7:22 pm on Apr 14, 2008 (gmt 0)|
This was easier than i thought :P
So, is this correct?
$content = $_COOKIE["name"];
(If a cookies is set, $content gets its value)
| 7:32 pm on Apr 14, 2008 (gmt 0)|
yes, it should be correct
try it and see
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved