I have a script which starts like this.
$vitals = array(
'name' => $usercheck['name'],
'id' => $usercheck['id'],
'pass' => $tmp
);
setcookie('lsd',serialize($vitals),$cookielife);
header('Location: user.php?mode=user&id=' . $usercheck['id']);
exit();
Then after the cookie is set, this piece of code runs (for debugging purposes):
$vitals = unserialize($lsd);
echo '<pre>' . print_r($vitals) . '</pre>';
echo '<pre>' . print_r($lsd) . '</pre>';
echo $vitals['name'];
echo $vitals['id'];
echo $vitals['pass'];
$lsd prints the serialized array. However... print_r($vitals), after it has been unserialized, prints a boolean figure. I also know that its a boolean because I used gettype() on it. I want it to turn into an array and not a boolean.
Help is appreaciated, thanks in advance.