EDIT : I might just make it a more ‘step-by-step‘ process i.e.

Seeing as it feels more user-friendly & it’s only for <5 images. I have read & appreciate all of the help that I have received so far.
I’m fairly new to PHP & I’m building a basic PHP image editor which may allow multiple image data auditing which is then inserted into a MySQL database. A limit of 5 images may be uploaded at a time for this system (implying that there will only be a low amount of records to play with), but I’ll get to that further down.
GUI:

Some of the data columns used:
- image id
- caption
- description
- published
- imageposition
- delete button
All images are echo’d in a while loop by a previous ‘SELECT *’ result set. Each image will have the ‘image id’ echo’d inside each input name, so output will be for example:
caption-2, description-2, published-2, imageposition-2, caption-3, description-3
Also, the data values from the previous resultset are echo’d into the input value, allowing the client to edit the current data that exists in the database. There is only one submit button.
My question:
I want to be able to post all of the modified image(s) data to a processor.php form which will then allow me to insert it as an INSERT sql string into the MySQL images table. I need the PHP to be dynamic incase:
- images are deleted (image id)
- new images are uploaded (image id)
If there is an easier way of doing any of the above, I am welcome to new ideas/opinions. Sorry in advance for my poor understanding of PHP.
To delete the records easily :
In deleteimg.php :
Updating and adding new rows may involve javascript, and much more harder.