PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
<a href="<?= $_SERVER['PHP_SELF'] ?>?level=<?= $line['level'] ?>&code=<?= $line['code'] ?>" onclick="return confirm('Are you sure you want to delete this?')">delete</a>
?>
This brings up a message box saying 'Are you sure you want to delete this?' Ok, Cancel. However, if I click on either ok or cancel it deletes. How can I make it so that cancel will actually stop the process?
and pass the $line['level'] and $line['code'] as level and code parameters for this function. Inside this function you deal with the confirmation before changing the document.location.