<script type="text/javascript">
var areYouSure=confirm("Are you sure you want to delete?")
if (areYouSure==true) {
document.write("<? code here?>")
}
</script>
Okay I see what's happening. javascript is client side and php is server side, what you have to do for something like this is:
1) Bake the button to delete entries go to a javascript that looks similar to the above.
2) Make the form point to the script that deletes a post and pass it the variables in hidden form fields to delete a post.
3) Change the document.write above into document.forms[x].submit(). Where x is the number of forms that appear in the html code before the form you wish to submit. Therefor is you have two forms on your page and you wish to submit the one that appears first in the code x is 0, if you wish to submit the one that appears second in the code x is 1 and so on.