Re: handling tag and quote (' & ")
| From: | Matthew Weier O'Phinney | Date: | Wed, 17 Nov 2004 02:28:02 +0000 |
| Subject: | Re: handling tag and quote (' & ") | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202268@lists.php.net to get a copy of this message | ||
* Adwinwijaya <adwinwijaya@yahoo.com.au>:
> Hello php-general,
> Is there suggestion about how to remove html tag, javascript and quote
> (' & ") from user's input at the same time ?
Yes.
Oh, you wanted an example?
$value = preg_replace('/[\'\"]/', '', strip_tags($value));
--
Matthew Weier O'Phinney | mailto:matthew@garden.org
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org