note 51225 deleted from function.unserialize by nlopess

From: Date: Fri, 25 Mar 2005 14:16:50 +0000
Subject: note 51225 deleted from function.unserialize by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-86978@lists.php.net to get a copy of this message
Note Submitter: hans at lintoo dot dk ---- This has been said before, but it seems it can't be stessed enough: <?php public function serialize() { $saveFile = serialize($this->myAuth); setcookie("passport", $saveFile, time() + 7200,"/","127.0.0.1"); } ?> and <?php $this->myAuth = unserialize(stripslashes($_COOKIE["passport"])); ?> Remember to do stripslashes! With all GET, POST, and COOKIE data. Hans Duedal // http://www.lintoo.dk/

« previous php.notes (#86978) next »