I have tried about 15 different ways to delete a record yet this code does not delete but also does not throw an error.
What am I doing wrong here?
Code:
if ($_GET['pg']=="staff" && $_GET['rec']=="x_del"){
$id_to_delete = $_GET['id'];
$sql = "DELETE FROM `Employees` WHERE `idEmployees` = :idEmployees";
$stmt = $pdo->prepare($sql);
//echo $id_to_delete;
$stmt->execute( array( ":id_to_delete" => $id_to_delete ) );
//$stmt->bindParam(':idEmployees', $_Get['id'], PDO::PARAM_INT);
//$stmt->execute();
}
What am I doing wrong here?