Comment créer confirmer oui/non en php?

Je veux créer une confirmer oui/non boîte en php
mon code comme ceci:

<?php
if(isset($_REQUEST['id']))
{
?>

<script>
 var cf=confirm("do you want to delete Y/N");
 if(cf)
  { i want to call code edit of php

  }
</script>
<?php
}
?>
<html>
<head>
</head>
<body>
<form name="frm" method="post" action="edit.php">
<a href="edit.php?id=1">Edit </a> <br>
<a href="edit.php?id=2">Edit </a> <br>
<a href="edit.php?id=3">Edit </a> <br>

</form>

</body>
</html>

Je Veux lorsque vous appuyez sur Oui, je l'appelle de code à modifier dans le PHP
Mais il ne fonctionne pas.
Pouvez-vous m'aider ?
Merci

utiliser inline onclick événement

OriginalL'auteur Thanh Nguyen | 2016-04-28