note 84371 added to function.get-magic-quotes-gpc

From: Date: Thu, 10 Jul 2008 16:09:31 +0000
Subject: note 84371 added to function.get-magic-quotes-gpc
Groups: php.notes 
Request: Send a blank email to php-notes+get-141374@lists.php.net to get a copy of this message
function anti_sql_injection($string) { $string = get_magic_quotes_gpc() ? stripslashes($string) : $string; $string = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($string) : mysql_escape_string($string); return $string; } I need to understand this function, to apply in a data base... And execute it between the creation of a query and the execution of the same query... I'm waiting for an answer... Thanks folks! ---- Server IP: 69.147.83.197 Probable Submitter: 201.6.67.27 ---- Manual Page -- http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Edit -- https://master.php.net/note/edit/84371 Del: integrated -- https://master.php.net/note/delete/84371/integrated Del: useless -- https://master.php.net/note/delete/84371/useless Del: bad code -- https://master.php.net/note/delete/84371/bad+code Del: spam -- https://master.php.net/note/delete/84371/spam Del: non-english -- https://master.php.net/note/delete/84371/non-english Del: in docs -- https://master.php.net/note/delete/84371/in+docs Del: other reasons-- https://master.php.net/note/delete/84371 Reject -- https://master.php.net/note/reject/84371 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#141374) next »