Is there a way to avoid multiply submit processing if a page is refreshed. For instances, if I have
[code=php]
#Delete
if(isset($_POST[‘del’])){
#do delete
}
[code=html]
<script type=”text/JavaScript”>
function deleteIt(){
var stay = confirm(“This will DELETE this Administrator Information. Click ‘OK’ to continue and ‘Cancel’ to exit.”)
if (!stay)
window.location=”<?php echo $admin.”&_cmd=_view”; ?>”
}
//–>
</script>
and a delete form as
[code=html]<form onsubmit=”deleteIt()” action=”<?php $admin.”&_cmd=_view”; ?>” method=”post” name=”del” id=”del”>
<input name=”delete” type=”image” id=”delete” src=”../images/btn/delete.gif” alt=”Delete <?php echo $va[‘username’] ?>” align=”bottom” />
<input name=”del” type=”hidden” id=”del” value=”<?php echo $va[‘aid’] ?>” />
</form>
If this delete button is clicked the confirmation box pops up and if I click cancel, it delete the record. If the page is refreshed, there is always a delete attempt.
Is there a way to stop this?