note 25010 deleted from function.strip-tags by philip
| From: | philip@php.net | Date: | Tue, 07 Jan 2003 00:21:18 +0000 |
| Subject: | note 25010 deleted from function.strip-tags by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41770@lists.php.net to get a copy of this message | ||
Here's a quick way to protect all your incoming values against cross-site scripting attacks by
removing HTML tags:
foreach (array_merge (
$_POST, $_GET) as $k=>
$v) {eval('$'.$k.'="'.
strip_tags($v).'";');}
You could modify this to include cookie and session values as needed.