I am trying to create a user registration activity in Android Studio, where the Manager registers the employees and selects the actions the employee is allowed to do. I have done the registration in PHP and looks like this:
<?php foreach ($action_item as $key => $value):?>
<input type="checkbox" name="actions[]" value="<?php echo $value['ID_action'] ?>"><?php echo $value['Action_Name'] ?><br>
<?php endforeach; ?>
The actions are stored in the "Actions" table. And the code inserts their IDs in the "Employee_has_action" table with the structure(Id_EHA, ID_employee, ID_action). I know how to insert to and retrieve data from online DB with json, so the question is how to (if possible) dynamically make several (number of retrieved database rows from Action table) checkboxes through code and give them the retrieved values? Or any other better options where at user register the manager selects multiple data and they get inserted to DB?
Thanx in advance.
Aucun commentaire:
Enregistrer un commentaire