The code works fine if I don\'t use the mysql_real_escape_string function. But the function is returning nothing! I read that the problem may be due to the fact that I do no
You need to pass the connection to the function
$title = mysqli_real_escape_string($con, $_POST["title"]);