Good evening. There is such a code (simplified)
<div data-user-email="<?=$users['email']?>" data-event-id="<?=$event['id']?>" class="event-div"> <span class="my_btn delete-event" style="background-color: red;">Удалить</span> </div>
Output this block in a cycle, so the data-user-email
and data-event-id
values are different. How to get the data attribute value when you click on the delete-event
button in the current block.