Re: sanitizing get vars
| From: | Marek Kilimajer | Date: | Fri, 03 Jun 2005 00:28:11 +0000 |
| Subject: | Re: sanitizing get vars | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-216283@lists.php.net to get a copy of this message | ||
Sebastian wrote:
what is a safe way to clean a post/get before echoing it. example. input form, user enters some text, hits enter. .. next page i echo what they entered. right now i just run the variables passed by htmlentities() which preseves any html. is that acceptable?You might also want to use stripslashes() if magic_quotes_gpc is on, so the data is not double escaped.