Escape string in mysqli

139 Views Asked by At

I have a function to escape string in my OOP PHP project like this....

public function escape($string)
{
    $query = mysqli_real_escape_string($this->connection, $string);
    return $query;
}

is my code right? Or any one can give me a right way?

0

There are 0 best solutions below