Delete PHP

Pranat
0
Lamp

 <?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;

}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !