[eluser]Jilani Jidni[/eluser]
[quote author="Dale Rodgie" date="1220356597"]I have created a form and my controller script validates it and builds an error message in the variable $errorMessage. I then test if $errorMessage is not NULL, I display the form again with an error box. I then want to exit the script:
Code:
// header displayed earlier in code
if ($errorMessage != NULL) {
$row->al_error_message = $this->error->error_box($errorMessage);
$this->load->view('newsletter_form', $row);
$this->load->view('footer', $settings);
exit;
}
However, nothing displays. Is there a way to output what is already passed to output before I exit?
Thanks[/quote]
Your code does not seems any problem. are you sure your program enter into the if condition. if yes then check this function
Code:
$this->error->error_box($errorMessage);
. and also debug your code......