Dynamic Website Project - Working for algorithm of addition of posts to database