I update php 5 to php 7 quite recently.so that when i run the project it gives following error.
Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\Project\Duplicate - Copy (2)\general.php on line 5
Here is the Code.
<?php
function sanitize($data){
return mysqli_real_escape_string($data);
}
?>
then i recoded connection like this.
$db = new PDO('mysql:host=localhost;dbname=test;charset=utf8mb4', 'root', "");
can anyone help me please!