note 110593 deleted from filter.filters.sanitize by googleguy

From: Date: Sun, 11 Nov 2012 00:50:43 +0000
Subject: note 110593 deleted from filter.filters.sanitize by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191857@lists.php.net to get a copy of this message
Note Submitter: a3diti at gmail dot com ---- this cleans it all function clean($input) { $input = trim($input); //remove whitespace... $input = get_magic_quotes_gpc() ? stripslashes($input) : $input; //disable magic quotes... $input = is_numeric($input) ? intval($input) : mysql_real_escape_string($input); //prevent sql injection... $input = htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); //prevent xss... return $input; }

« previous php.notes (#191857) next »