Ciao, ho un problema abbastanza semplice per voi (almeno spero) ma dal quale non so uscirci

Voglio che quando un utente inserisce in un campo un carattere strano come / oppure \ oppure " ci sia un controllo php che restituisce errore dicendo che i caratteri particolari non possono essere inseriti.

una cosa del tipo: if(lastringacontiene(") || lastringacontiene(/) || lastringacont....) { print errore; }

Il problema è anche un altro: se qualcuno inserisce in un form "ciao" viene convertito in "/ciao"/

Ho trovato questo:
function RemoveHtml($text) {
$text = stripslashes($text);
$text = htmlspecialchars($text);
$text = nl2br($text);
return($text);
}
a che serve? Può aiutare?

grazie, ciao