Hi,
I'm going straight to the point. I need to define the table name from GET variable. This variable is named "table".
Here you can see my code:
public function crud(){ //Fetching the GET variable into variable for easier use. $table = $this->input->get('table'); //Load of CRUD and load it. $this->load->library('grocery_CRUD'); $crud = new grocery_CRUD(); //Setting CRUD attributes. $crud->set_table($table); $crud->set_subject($table); //Rendering it and loading the view with the data. $data["output"] = $crud->render(); $data["view"] = "data/crud"; $this->load->view('layouts/main', $data); }
But issue comes when I do the create function, then I lose the GET variable.
Error:
Message: The table name cannot be empty.
Anyone got any good tips or tricks to get this sorted?
Thanks in advance.
Best Regards