-1

Im just using mysqli::escape_string to prevent errors from " ` "'s and this error appears:

enter image description here

How can I fix this?

Thanks!

----------------------------------------------------------EDIT-----------------------------------------------------------

I did:

$DB = new mysqli();
$Escape = $DB->escape_string($String);

(I use it a few times)

And I get this:

enter image description here

mn6vdv23g
  • 734
  • 2
  • 10
  • 33

3 Answers3

0

before call it please create mysqli object

//creating
$myDb  = new mysqli();

//using
$myDb->escape_string($escape_string);
0

Basically saying:

This method does not support the call mysqli::escape_string

You will need to use the following method :

$DB = new mysqli();
$Escape = $DB->escape_string($String);
Daryl Gill
  • 5,464
  • 9
  • 36
  • 69
0

*mysqli::escape_string()* is a static call to the function escape_string(), something which mysqli doesn't support. You should use one of the options above.

Ivo Geersen
  • 195
  • 1
  • 8