Inside of functions, you should also handle all errors. The easiest thing to do is set a $feedback
variable, and in your header/footer template, you always echo out that $feedback variable if it
exists. This has worked well for me.
Of course, the same error checks should be performed on database updates, inserts, and deletes.
Give yourself 1 point if you check all your database queries and provide proper feedback to the user.