note 674 rejected from function.serialize by ronabop

From: Date: Tue, 16 Apr 2002 04:31:15 +0000
Subject: note 674 rejected from function.serialize by ronabop
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29413@lists.php.net to get a copy of this message
Based on my experience: If you are storing serialized data in a database, you need to serialize() the data, *then* addslashes(), then stick it in the DB. When you pull it out, stripslashes() (if you don't automatically do it), then unserialize(). If you are passing serialized data between pages in hidden form fields (or in a query string), you need to serialize() the data, then *urlencode()* it, then put it in the hidden field. When you get to the next page, urldecode() it, then unserialize().

« previous php.notes (#29413) next »