prova cosi quando fai query di inserimento nel db es :

Codice PHP:
 $title=addslashes($_POST["titolo"]);
$query=insert into tb values('$titolo');