mysql_escape_string($variabile);

http://it.php.net/manual/it/function...ape-string.php