Report question

Question: In PHP when submitting strings to the database should I take care of illegal characters using htmlspecialchars() or use a regular expression?