da un form, tratto i valori con:

Codice PHP:
htmlentities($_POST['miotesto'], ENT_QUOTES); 
quindi, nella successiva query INSERT avrò i \ ' " con le rispettive entità html.

A cosa può tornare utile mysql_real_escape_string se alla fine andrà a backslashare un'entità html?
farà così:

\& q u o t ;\ e così via.