php - mysqli_real_escape_string($link,$_REQUEST) for all variables -


i'm using mysqli first time .

in mysql have used .

$escapedget = array_map('mysql_real_escape_string', $_request); extarct($escapedget ). 

now have tried lot mysqli_real_escape_string mysqli_real_escape_string($link,$_request)

it says second parameter should string , tried passing string loop , can't make work , can please .

thanks in advance

i way:

function sanitize($value){     global $mysqli;     return $mysqli->real_escape_string($value); }  if($_post){$_post = array_map('sanitize', $_post);} if($_get){$_get = array_map('sanitize', $_get);} if($_cookie){$_cookie = array_map('sanitize', $_cookie);} if($_request){$_request = array_map('sanitize', $_request);} 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -