added 'get_data_from_post' and 'get_data_from_db' functions to webpages controller