user880789 user880789 - 4 months ago 20x
SQL Question

PHP Error: Mysqli_real_escape_string() expects exactly 2 parameters, 1 given

if (phpversion() >= '4.3.0'){
$string = mysqli_real_escape_string($string);
$string = mysqli_escape_string($string);

All the documentation for
seems to indicate this is a valid bit of code - don't understand?


Documentation saying two parameters: string mysqli_real_escape_string ( mysqli $link , string $escapestr ).

The first one is a link for a mysqli instance, the second one is the string to escape.