Added ability edit posts and fixed database connection error