⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Redirect to add form not working using unset_list



jodeen20
  • profile picture
  • Member

Posted 01 February 2016 - 10:09 AM

Hello GC masters, im trying to use the add form only of the GC. I tried the example given from the API. here's my code

function testing(){
        $mycrud = new grocery_CRUD();
        $mycrud->set_table('employee');
        $mycrud->set_theme('datatables');
        $mycrud->unset_list();
        try{
            $mycrud->render();
            //$this->load->view('crud',$output);
        } catch(Exception $e) {
 
            if($e->getCode() == 14) //The 14 is the code of the "You don't have permissions" error on grocery CRUD.
            {
                redirect('hrmo/testing/add');
            }
            else
            {
                show_error($e->getMessage());
            }
        }
    }

 

when i run the controller testing on my url box it properly redirects me to the add function but nothing appears on my screen.. i am expecting to see the add employee form.

 

please help. thanks