<?php
$sn = $_GET['sn']; // use $_GET instead of $_POST because you're passing sn via the URL
$conn = mysqli_connect('localhost', 'ksumanadhikari', 'welcome', 'task');
$sql = "DELETE FROM data WHERE sn = $sn"; // Potential risk of SQL injection
mysqli_query($conn, $sql);
mysqli_close($conn);
header("location: index.php");
exit();
?>
Wednesday, December 25, 2024
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment