vid 31&32:
Implemented query function and refactored code to use database class
Removed unnecessary code in create-post.php