Adding insert post and update post

created two new functions and modified the earlier database connection
function, now database connection does'nt gives any message, instead it
is now a function which returns a boolean type.

Also added insert_post function and update_post which excepts an array
for body. it also returns a boolean type.