my code-
require \'database.php\';
$title = mysql_real_escape_string($_POST[\'title\']); //line 48
$cat = $_POST[\'cat\'];
$txtart = mysql_real_escape_stri
Please check your MySQL username and password and make sure you're entering them properly in mysql_connect
. According to the error you didn't run mysql_connect
with a password, which may be causing these problems.
Check database.php connection strings, and the MySQL server is running as mysql_real_escape_string needs a valid open database connection to work.
mysql_real_escape_string
tries to connect to the local database, so it can fetch the settings it needs to escape the string correctly for that system.
You can tell the function which connection to use by passing in a link identifier as a second argument:
mysql_real_escape_string($string, $link)