echo "<a href='categories.php?do=Edit&catid=" . $cat['ID'] ."' class='btn btn-xs btn-primary'><i class='fa fa-edit'></i> Edit </a>";
echo "<a href='categories.php?do=Delete&catid=" . $cat['ID'] . "' class='btn btn-xs btn-danger confirm'><i class='fa fa-close'></i> Delete </a>";
When i click on Delete button, it open Update page not Delete Page Although href is :categories.php?do=Delete&catid=
code of delete page is :
//Delete Member Page
echo "<h1 class='text-center'>Delete Category</h1>";
echo "<div class='container'>";
$catid = isset($_GET['catid']) && is_numeric($_GET['catid']) ? intval ($_GET['catid']) : 0;
$check = checkItem('ID', 'cato', $catid);
if($check > 0 ) {
$stmt = $con->prepare("DELETE FROM cato WHERE ID = :zid");
$stmt->bindParam(":zid", $catid);
$stmt->execute();
$theMsg = "<div class='alert alert-success'>Done</div>";
redirectHome($theMsg);
}else {
$theMsg = "<div class='alert alert-danger'>Sorry You Cannot Delete It</div>";
redirectHome($theMsg);
}
echo "</div>";