⚠ 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

Error in adding records



patogh2018
  • profile picture
  • Member

Posted 17 May 2018 - 03:09 AM

Hello, I am facing a problem with GC. I need to add some info to a table and I am getting the error:

 

500 (Internal Server Error)

 

This is the code I have in the controller:

 

function testdb(){
   $crud = new grocery_CRUD();
   $crud->set_theme('flexigrid');
   $crud->set_table('testdb');
   $crud->required_fields('A');
   $output = $crud->render();
   $output -> op = 'user_management';
 
   $this->_admin_output($output);
}
 
My table testdb has only 3 feilds: id (INT), A(INT) and B(varchar 100) - mysql

 

When I remove the "$crud->required_fields('A');" I am able to save the data, but when I activate the required_field conditions the system returns 500 (Internal Server Error). I have checked logs for errors but nothing found.

 

Can you help me?

 

Thanks for your help,