added url and db checks for post id