⚠ 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

Add field with current Session User ID



maxteam
  • profile picture
  • Member

Posted 16 January 2013 - 10:12 AM

Hello
wat i am trying to do is this
    function leave_request()
{
$crud = new grocery_CRUD();
$crud->set_table('xxx');
$crud->callback_add_field('id',array($this,'add_field_callback_1'));
$output = $crud->render();

}
function add_field_callback_1()
{
return '<input type="hidden" maxlength="50" value="'.$user_id.'" name="upro_id" style="width:462px">';
}

when adding a field i was the column Id to be unchangeable and a specific value entered to it

The reason i am not using the above code is that it is vulnerable,we can change the Value easily