handling post requests to when page