note 47509 added to function.serialize
| From: | paulatmoveNOtoSPAMicelandDOTcom at osu1 dot php dot net | Date: | Thu, 18 Nov 2004 16:29:43 +0000 |
| Subject: | note 47509 added to function.serialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-80701@lists.php.net to get a copy of this message | ||
I was trying to submit a serialized array through a hidden form field using POST and was having a
lot of trouble with the quotes. I couldn't figure out a way to escape the quotes in the string
so that they'd show up right inside the form, so only the characters up to the first set of
quotes were being sent.
My solution was to base64_encode() the string, put that in the hidden form field, and send that
through the POST method. Then I decoded it (using base64_decode()) on the other end. This seemed to
solve the problem.
----
Manual Page -- http://www.php.net/manual/en/function.serialize.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47509
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47509&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47509&report=yes
Search -- http://master.php.net/manage/user-notes.php