I am struggling to find an answer to my question… maybe I am searching the wrong keywords?
I am writing an internal site for myself in PHP, MySQL etc and have a delete option all over the place using an icon and a Bootstrap 4 Modal for the confirm before deleting.
As a work around I have put the Modal in the while loop and included the uniqueID in each modal… this works fine now however, in the future, there could be thousands of entries which would mean the same code is created thousands of times… which I do not think is necessary.
What I think I need to do is have the delete confirm modal added once and on the icon have the uniqueID and dynamically pass the uniqueID to the modal however I cannot work out how to do that.
It would be great if you could tell me how or point me in the right direction.
Thanks for any help.