Im trying to convert my Wordpress theme from PHP 5.4 to 7.1
But... I still don't understand what's happening with this error :
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /home/myhost/wp-content/themes/mytheme/functions.php on line 69
$con = new mysqli('localhost', 'my_user', 'my_password', 'my_db');
function cG($name){
if(get_magic_quotes_gpc()) $_GET[$name]=stripslashes($_GET[$name]);
$name=mysqli_real_escape_string($con, $_GET[$name]);
return $name;
}
I tried to follow this, but even I get the error... Any idea ? Thank you!