I have this code is about delete rows in table with confirm. everything is correct and work but in confirm when I click cancel not working it delete row
I want to konw wate is the problem when clicking cancel
here is my code
<script type="text/javascript">
function show_confirm()
{
var r=confirm("Are you sure you want to drop this appointment?!");
if (r==true)
{
alert("The appointment has been canceled!");
}
else
{
alert("Cancel!");
}
}
<a href=viewp.php?appc=$appcode onclick='show_confirm()' value='drop'>Drop</a>
if (r==true){
//here will be th query for delete
}