You can't do that. PHP executes on the server, and generates the HTML and Javascript text that's sent to the client. By the time the client starts executing the javascript, the PHP script has long since finished executing.
If you need to have some sort of user interaction, it needs to happen in multiple requests.
That is, generate a PHP page with a form or something saying "Are you sure?" and when the user submits that, go ahead and delete your thing.
The other (and easier to implement) option is to embed a javascript event to your original form page to pop up an "Are you sure?" dialog before submitting the form. If the user clicks "yes", then Javascript will go ahead and submit the form. If the user clicks "no", the form is not submitted.
Take care,
Nik
http://www.bigaction.org/