Here is what I am trying to do.
I have a page where the user can delete there own posts they make in a message board. Basically what I am trying is when they click on the "delete message" button it prompts them with a javascript confirm box.
Depending on what the user choses it either executes a delete SQL query or not
Basically what I tried is this
<script type="text/javascript">
var areYouSure=confirm("Are you sure you want to delete?")
if (areYouSure==true)
{
document.write("<? code here?>")
}
else
{
}
</script>
It keeps giving me parse errors though. Anyway if there must be a way to do this?
Any help would be great!!
Adam