[eluser]Unknown[/eluser]
Hi everyone,
I have one view that includes other views (main view include header, footer ), but the header and footer view have a couple of variables that are filled by controller (with model values).
My problem are in main view when i submit a form i call the controller "regist" method and in that method i have this code :
$this->load->model('data');
if($this->input->post('submit'))
{
if($this->data->regist()==true)
{
$data['cabecalho']="SUCESS";
$this->load->view('main_clock',$data);
}
else
{
$data['cabecalho']="ERROR!";
$this->load->view('main_clock',$data);
}
}
And when return to main view i have several error because the variables to fill in footer and header are cleaned, how i can resolve this problem?
I want basically reload to initial page when a user submit a form.
Regards.