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