[eluser]frist44[/eluser]
I have created a few applications using some similar methods and found some issues with this particular one that I was never able to pinpoint. I have a view function that showing some information about an upload.
I do a check to see if info exists for that particular ID, and if it doesn't, redirect to a different page, which in turn shows some message based on flash data in the session library.
Code:
public function view($uploadid = FALSE) {
// If not id is specified, go home
if (!$uploadid) redirect(base_url());
$data['upload'] = $this->uploads_model->get_upload($uploadid);
// If not data is found with that ID, show error
if (empty($data['upload'])) redirect_with_error(base_url(), 'flash_error_upload_view');
$data['content_view'] = 'upload_view_view';
$this->load->view('container_view', $data);
}
So when I first go to the page, everything looks normal, if I refresh the page, I get the error message showing as though the condition if (empty($data['upload'])) is satisfied however it doesn't do the redirection, just shows the message. That's the only place that message is referenced, so it has to be from that call.
Any idea????