<?php
require 'db.php';
$id = filter_input(INPUT_GET, 'id');
$sql = "DELETE FROM tblStudents WHERE student_id=$id";
if ($con->query($sql) === TRUE) {
header("Location:index.php");
} else {
echo "Error: " . $sql . "<br>" . $con->error;
}
<?php
require 'db.php';
$id = filter_input(INPUT_GET, 'id');
$sql = "DELETE FROM tblStudents WHERE student_id=$id";
if ($con->query($sql) === TRUE) {
header("Location:index.php");
} else {
echo "Error: " . $sql . "<br>" . $con->error;
}
PranatPHP
PranatLinux
PranatDPA