EDIT: bah, ive posted in the wrong section, can a mod move to programming please 
hey,
ok, I am saving 2 values in my cookie, like so:
$u is username, $c is a cookie value (this is part of a remember script for logins).
now, when I come to extract it, I have this:
the echo is just for debugging, ive checked if the cookie contains a value, it does (and looks serialized). I can;t echo it unserialized or listed, am I doing something wrong?
here is a test url:
http://munkydesigns.co.uk/ScrtipsNew/login.php
u: username
p: password
make sure you check remember me lol
thanks in advance
hey,
ok, I am saving 2 values in my cookie, like so:
Code:
$cookie = @serialize(array($u, $c));
setcookie("siteLogin", $cookie, time() + 36000, "/");
$u is username, $c is a cookie value (this is part of a remember script for logins).
now, when I come to extract it, I have this:
Code:
if (isset($_COOKIE['siteLogin'])){
echo $_COOKIE['siteLogin']."<br />";
echo unserialize($cookie)."<br />";
list($u, $c) = @unserialize($cookie);
echo "username: ".$u." cookie: ".$c;
}
the echo is just for debugging, ive checked if the cookie contains a value, it does (and looks serialized). I can;t echo it unserialized or listed, am I doing something wrong?
here is a test url:
http://munkydesigns.co.uk/ScrtipsNew/login.php
u: username
p: password
make sure you check remember me lol
thanks in advance
Last edited:








