I am not actually login in to the page.But when i click on the services on index page for more services , show logout button instead of login.Please provide solution for this issue.
Controller:
public function more_services($serviceid)
{
$data = $this->data;
$this->load->helper(array('form','url'));
$id=$this->session->userdata('id');
$this->load->model('realpropertiesmodel');
$data['service']=$this->realpropertiesmodel->getServicesbyID($serviceid);
$this->smarty->view('service/service_viewdetails.tpl',$data);
}
public function logout()
{
$this->session->sess_destroy();
$data = $this->data;
redirect("realestate/index" ,'refresh');
}
In the view i add the following code:
[~if $id==''~]
[~include file="common/realestate_header.tpl"~]
[~else~]
[~include file="home/realestate_header.tpl"~]
[~/if~]
But i got the same error when add this much f code.Please provide solution for this issue