Index
Index
Index
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-
icons@1.10.1/font/bootstrap-icons.css">
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-
Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
<title>CRUD</title>
</head>
// Update the SQL query to select from the new table and column names
$sql = "SELECT id, firstname, lastname, email, age, course FROM students";
<script>
const delBtnEl = document.querySelectorAll(".btn-danger");
delBtnEl.forEach(function(delBtn) {
delBtn.addEventListener("click", function(e) {
const message = confirm("Are you sure you want to delete this record?");
if (!message) {
e.preventDefault();
}
});
});
</script>
</body>
</html>