[eluser]satterle[/eluser]
I think I figured it out on my own!
1. the view statement should be view('delete'), not view('co/delete')
2. going to a different mvc, in this case 'cancel', requires redirect('co/cancel')
------------------------
I have a controller that deletes a record from a database. I set it up as follows:
if($this->input->post('delete'))
{
$this->model->delete($id)
$this->load->view('co/delete', $data)
}
else if($this->input->post('cancel'))
{
$this->load->view('co/cancel', $data)
}
else
{
$this->load->view('co/delete', $data)
}
When I load the page the first time (the else condition), no problem.
When I try to load the page from the if conditions, I get an error message "unable to load the requested file: name of file".
I know that the if statements are working because a) a record is deleted when I click the delete button and b) the error message displays the appropriate file name when I click on the different buttons on the form.
Why don't the views load? How do I correct?