note 46123 deleted from function.stripslashes by philip
| From: | philip@php.net | Date: | Wed, 07 Feb 2007 04:56:57 +0000 |
| Subject: | note 46123 deleted from function.stripslashes by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123016@lists.php.net to get a copy of this message | ||
Note Submitter: pasamio AT sirdurkus DOT net
----
If your trying to pull out some variables from $_REQUEST and directly output them (in my case,
quoted text from a search query directly into a HTML text box) with magic_quotes_gpc on use:
htmlspecialchars(stripslashes($searchtext));
For example:
<input type="Text" name="searchtext" value="<?php echo
htmlspecialchars(stripslashes($searchtext)); ?>"><br>
$searchtext was pulled from the $_REQUEST variable where $searchtext = "lifeline \"darling
downs\""; It properly returns this (including quotes) in the text box.