Update data using checkbox ( php and mysql), How to update data using checkbox
Hi there,
I am a php beginner. Currently i am working on some testing php and i get stuck with updating data using checkbox.
The system that i build could update all data correctly if i check all the checkbox and then click submit button.
But there is a problem when i randomly select a row from table to update data. The data is updated according to the first row of data and not the data that i keyed in(i.e, the data is updated same with the value of first row in the table). Below is the codes. Hope someone could enlighten me
I have attached a screen shot of the project. In the picture, there is 2 row of data. It is work fine if i want to update the first row data or update 2 rows of data at the same the time.
The problem is, when i wanna update the second row, the data will not updated as the data that i keyed in the textarea(tracking number column) instead it will updated with the data as the first row. I have tested will 5 row of data before this, all the subsequent rows data will be replaced with the value same as the first row.
I guess there is a problem with looping problem, but I do not know how to solve it.