So, members of my website can post topics, replies, comments, edit them and so on. I always use htmlspecialchars and addslashes for html inputs to
htmlspecialchars
addslashes
You should use mysql_real_escape_string() for SQL, not addslashes. (Assuming you are using MySQL)