It's slightly confusing, I agree. But, let's see if we can help :)
htmlentities
makes data safe for outputting into an HTML document. The PHP manual says.
This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.
But keep in mind that using htmlentities() in an UTF-8 encoded document should be avoided at all costs! There are always problems, see http://www.phpwact.org/php/i18n/charsets#common_problem_areas_with_utf-8
addslashes
makes data safe for a few other situations, but if your database has its own then use that, for MySQL (mysql_real_escape_string
is needed there)