Re: Grab an array from a cookie without throwing errors?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> $cookie = $_COOKIE['bookmarks'];
> if(unserialize($cookie) == true) {
>         $bookmarks = unserialize($cookie);
> } else {
>         $bookmarks = array();
> }

if (isset($_COOKIE['bookmarks'])) {
$cookie = $_COOKIE['bookmarks'];
if(unserialize($cookie) == true) {
       $bookmarks = unserialize($cookie);
} else {
       $bookmarks = array();
}
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux