Hi, Friday, June 20, 2003, 7:42:48 AM, you wrote: SÖ> Hi, I’m having this problem:
SÖ> I set a cookie using this: SÖ> $sql = "UPDATE member SET cookie=$cookie WHERE SÖ> ". SÖ> "id = $this->id"; SÖ> $this->mysql->query($sql); SÖ> $cookie = SÖ> urlencode(serialize(array($_SESSION['username'], $cookie))); SÖ> setcookie('auth', $cookie, time() + 31104000, SÖ> '/', 'www.reddast.is'); SÖ> And then when I check the cookie using this: SÖ> list($username, $cookie) = SÖ> @unserialize(urldecode($cookie)); SÖ> using this query: SÖ> "SELECT * FROM member WHERE (username = $username) AND SÖ> (cookie = $cookie)"; SÖ> it looks like this when I debug the script and see the actual query that SÖ> is sent to Mysql: SÖ> "SELECT * FROM member WHERE (username = 'ofjord') AND SÖ> (cookie = '\'86aa5f7e6469efe09a17089957f59b0f\'')"; SÖ> I hope someone has any answers on this. SÖ> Best regards, SÖ> Sævar Öfjörð Magnússon SÖ> [EMAIL PROTECTED] SÖ> ICELAND SÖ> -- SÖ> PHP General Mailing List (http://www.php.net/) SÖ> To unsubscribe, visit: http://www.php.net/unsub.php Try base64 encoding/decoding it instead of urlencode -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php