the delete button uses an on click event to pass the ID of the item being deleted to the WADADeleteRecordID From Element. For example, here is the delete button code for my Results page:
<input type="button" class="formButton ResultsPageButton unstyled DeleteButton" value="" onclick="document.getElementById('WADADeleteRecordID').value=<?php echo($row_WADAitems['ItemID']); ?>;document.getElementById('deleteBox').style.display = 'block';document.getElementById('deleteMessage').style.display = 'table';" />
this portion passes the ID to the WADADeleteRecordID form element:
document.getElementById('WADADeleteRecordID').value=<?php echo($row_WADAitems['ItemID']); ?>;
to pass the name column, you would need to add another condition to the onclick event:
<input type="button" class="formButton ResultsPageButton unstyled DeleteButton" value="" onclick="document.getElementById('WADADeleteRecordID').value=<?php echo($row_WADAitems['ItemID']); ?>;document.getElementById('WADADeleteRecordName').innerHTML='<?php echo($row_WADAitems['ItemName']); ?>';document.getElementById('deleteBox').style.display = 'block';document.getElementById('deleteMessage').style.display = 'table';" />
the portion i added is:
document.getElementById('WADADeleteRecordName').innerHTML='<?php echo($row_WADAitems['ItemName']); ?>';
this will pass the name to an element with the ID WADADeleteRecordName, so the final step is to add a span tag with the ID "WADADeleteRecordName" to the delete message, for example:
This will permanently remove <span id="WADADeleteRecordName">name</span> from your database.
the onclick event will replace "name" in this code:
<span id="WADADeleteRecordName">name</name>
with the name from your database.