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

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -