php html form stop from reloading the page code example
Example: prevent form submit on page refresh php\
//Using Javascript
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>