Changed all database connections to mysqli. Moved post printing to display_post