note 68476 added to function.mysql-real-escape-string

From: Date: Fri, 28 Jul 2006 14:28:26 +0000
Subject: note 68476 added to function.mysql-real-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-115302@lists.php.net to get a copy of this message
A quick function to mysql_real_escape_string every value in array (Think $_SESSION and $_POST guys). This may be simple, and to some bloody obvious, but its useful little function, and I could find one on this page so: function CleanArray($array) { foreach ($array as $key => $value) { $array[$key] = mysql_real_escape_string($value); } return $array; } ---- Server IP: 85.116.0.130 Probable Submitter: 85.189.29.238 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-real-escape-string.php Edit -- http://master.php.net/note/edit/68476 Del: integrated -- http://master.php.net/note/delete/68476/integrated Del: useless -- http://master.php.net/note/delete/68476/useless Del: bad code -- http://master.php.net/note/delete/68476/bad+code Del: spam -- http://master.php.net/note/delete/68476/spam Del: non-english -- http://master.php.net/note/delete/68476/non-english Del: in docs -- http://master.php.net/note/delete/68476/in+docs Del: other reasons-- http://master.php.net/note/delete/68476 Reject -- http://master.php.net/note/reject/68476 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#115302) next »