Add functionality working

still need to add the rest of the relevant mysql queries such as
created date and userlevel.