note 9204 deleted from function.serialize by bobby
| From: | bobby@php.net | Date: | Wed, 11 Oct 2006 15:23:57 +0000 |
| Subject: | note 9204 deleted from function.serialize by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118416@lists.php.net to get a copy of this message | ||
Note Submitter: dmb27 at cornell dot edu
----
Actually, you don't want to use addslashes() EVER when passing between pages( not in POST when
passing in hidden fields, not in GET when appending to a URL). Only use addslashes() with a
database, that's the only time it helps you.
However, you still have work to do if you are sending variables to HTML pages. If via Hidden fields
in a <FORM> tag, use htmlentities(). This will turn all HTML speical characters into
something your browser will interpret as characters, not HTML. When you get to the next page, you
don't need to do any decoding.
If you are using GET variables and appending to URL's, use urlencode() on the variable. When
you get to the next page, you don't need to do any decoding, your browser did it for you.