I get an error message:
Warning: mysql_real_escape_string () [function.mysql-real-escape-string]: Cannot connect to the local MySQL server through the socket '/var/run/mysqld/mysqld.sock' (2)
Why am I getting this error? Does Mysql_real_escape_string () work on all my pages except one? This is because MySQL is on a different server on the PHP server - if so, how can I fix it?
$fname = $_POST['fname'];
$fname = stripslashes($fname);
$fname = mysql_real_escape_string($fname);
source
share