per il testo dentro l'input, utilizzare htmlspecialchars.
per l'url, utilizzare urlencode.
per le query, mysql_real_escape_string.