Added the database functions

Check test_user.php view for an example on how to use database
functions.