In advance, I would like to apologize if this topic has been covered.
I am working on a simple PHP project, where I have to set permissions of certain client to certain user ID. I.e Individual user will be able to access only certain clients.
The list of client is in mysql table, and no of rows will be increasing.
So, I have to fetch all rows from table "clients" and to list them on the page. Then I have to update "client_user" for permisisons. How can I update these since when I fetch data, I am not sure how to name HTML input elements so that when I update, I know which elements to fetch?
after update button is clicked:
$_POST['x'];
The x is HTML element. How can I give it ID or any refrence when fetching, so that I can use it when updating?
Many Thanks
You can use the array name notation in order to figure out which client's information changed
This will generate an array when posted, e.g.
This array you then can use to modify the correct client's name