i want to display a confirmation message when a user clicks delete.can any1 tell me how i could do it with javascript and php
here's my code
$id=$r["sr_no"];
if($r['district']==1 || $r['district']=='North')
{
$r['district']=North;
echo "<tr><td >{$r['sr_no']}</td><td >{$r['name']}</td><td >{$r['designation']}</td><td >{$r['dte']}</td><td >{$r['ph_o']}</td><td >{$r['ph_m']}</td><td >{$r['ph_r']}</td><td >{$r['district']}</td><td >{$r['taluka']}</td><td >{$r['pan_name']}</td><td><a href='edit.php?cmd=edit&id=$id'>Edit</a></td><td><a href='edit.php?cmd=delete&id=$id' >Delete</a></td></tr>";
echo "";}
if($_GET["cmd"]=="delete" || $_POST["cmd"]=="delete")
{
$id = $_GET["id"];
$sql=caseQuery("delete from designation where sr_no=$id");
if($result)
{
redirect('edit.php');
}
else
{
echo "<p>cannot delete your data<p>";
}
}