What is the correct way to call the onClick event inside a link sending php variables?
I try to use the following code but is not working.
echo"<td><a href='/ADMIN/deletebooks.php?ID=".$row['ID']." onClick='return confirm('Do you really want to delete this book?')''>Delete</a></td>";
My javascript function is as follow:
<script type="text/javascript">
function ConfirmChk(){
{
if(confirm("Do you really want to delete this book?");
return true;
}
else{
return false;
}
}
</script>
Any idea?