Why do I get this error?
Call to undefined function
mysql_real_escape_string()
Has it something to do with being old code?
Why do I get this error?
Call to undefined function
mysql_real_escape_string()
Has it something to do with being old code?
Seems like you are using PHP 7, in which many new features were added and the already deprecated item, mysql_*
were removed, thus, it would generate an function alert just as you faced. So use either, mysqli_*
or PDO
. But don't mix DB apis!