<?php
require_once "labClass.php";
$con = new labClass();

 
    // Hash password 
   if (isset($_POST['delete'])) {
    $id = intval($_POST['id']);
    try {
        $stmt = $con->deleteT($id);
        echo "<span class='text-danger'>User deleted successfully!</span>";
    } catch (PDOException $e) {
        echo "<span class='text-danger'>Error deleting user: " . htmlspecialchars($e->getMessage()) . "</span>";
    }
    exit;
 
   
}
?>
