delete student
user_9960396
plain_text
a year ago
452 B
14
Indexable
<?php
include "db/db_connection.php";
if (isset($_GET['id'])) {
$studID = $_GET['id'];
$sql = "DELETE FROM tbl_Student WHERE StudID = ?";
$params = array($studID);
$stmt = sqlsrv_query($conn, $sql, $params);
if ($stmt === false) {
die(print_r(sqlsrv_errors(), true));
}
header("Location: index.php");
exit();
} else {
echo "No student ID provided!";
exit();
}
sqlsrv_close($conn);
?>Editor is loading...
Leave a Comment