note 4752 modified in strip_tags by ronabop

From: Date: Fri, 11 Aug 2000 18:17:02 +0000
Subject: note 4752 modified in strip_tags by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1371@lists.php.net to get a copy of this message
Generic PHP code to make any PHP script safe against cross system scripting attacks: <PRE> if(is_array($HTTP_POST_VARS)) { reset($HTTP_POST_VARS); while (list($key, $val) = each($HTTP_POST_VARS)) { $HTTP_POST_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } } if(is_array($HTTP_GET_VARS)) { reset($HTTP_GET_VARS); while (list($key, $val) = each($HTTP_GET_VARS)) { $HTTP_GET_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } } if(is_array($HTTP_COOKIE_VARS)) { reset($HTTP_COOKIE_VARS); while (list($key, $val) = each($HTTP_COOKIE_VARS)) { $HTTP_COOKIE_VARS[$key] = strip_tags($val); $$key = strip_tags($val); } } </PRE> http://www.php.net/manual/function.strip-tags.php

« previous php.notes (#1371) next »