controllers/posts.php
public function index()
{
$data["result"] = $this->posts_model->get_all();
$this->load->view('admin/posts/posts', $data);
}
public function delete_posts($id='')
{
$this->posts_model->delete($id);
index();
}
I have two functions and I want to call the index function after deleting the post? Is that possible?
Type: Error
Message: Call to undefined function index()
Filename: C:\xampp\htdocs\coolcicms\application\controllers\posts.php
Line Number: 70
I get this error.
I also tried:
$this->db->call_function('index');
Then I get "this feature is not available for the database that you are using."
" If I looks more intelligence please increase my reputation."