solved adding the same value for diferent detail types.
cleaned crud.php code