Is it possible to create a button in PHP that allows users to click multiple times without saving the value each time?

When creating a button in PHP, each click typically triggers a form submission which can save the value in a database or perform some action. If you want users to be able to click the button multiple times without saving the value each time, you can achieve this by using JavaScript to handle the button click event without submitting a form.

<button type="button" id="myButton">Click Me</button>
<script>
document.getElementById("myButton").addEventListener("click", function() {
    // Add your PHP code here to perform the desired action
});
</script>