CodeIgniter Forums
$this->form_validation->run() results in blank page? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: $this->form_validation->run() results in blank page? (/showthread.php?tid=46609)



$this->form_validation->run() results in blank page? - El Forum - 11-08-2011

[eluser]Unknown[/eluser]
Hey there!

Code:
public function follow_up_report()
{
  $data['title'] = 'Follow-Up Report';
  $data['status'] = 'no_success';

  if ($this->uri->segment(3) == 'save')
  {
   $this->form_validation->set_rules('date', 'date', 'valid_date');
   $this->form_validation->set_message('valid_date', 'You must enter a valid date!');

   if ($this->form_validation->run())
   {
    $data['status'] = 'success';
   }
  }

  $data['page_content'] = $this->parser->parse('outreach/follow_up_report', $data, TRUE);
  $this->parser->parse('outreach/main_view', $data);
}

Why is it that, whenever the 3rd URL segment is 'save,' the page disappears? I have confirmed that $this->form_validation->run() is causing this, but I am not sure why. Any help would be immensely appreciated!