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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -