Remove isset($_POST['submit']))

Changed to if ($this->request->is_set_post('submit'))