Updating table rows in php 4
On clicking the Previously, we have seen about how to handle edit for each record.
And then, we can simplify it for delete operation by removing unwanted steps like a form submits and etc.
We are going to take similar example seen in PHP CRUD article.
From that example, let us take list_and edit_and continue with the list of steps stated above.
With these steps, we should make little changes on list_and edit_
But, step 2, 3 is not required for deleting multiple rows.
For each users row, we need to add checkbox input while iterating over a loop with the query result.
So, we should create another column with user’s list view for checkbox input.
For that, we need to make two main changes with the edit_user.php, we have seen in PHP CRUD. So, on submitting this multiple user information, an array of user information for each user, will be passed to PHP code.
By iterating over this multidimensional array, each user record will be updated by setting current iteration values to My SQL UPDATE query.