Skip to content

Commit aadfa19

Browse files
authored
Create delete.php
1 parent 6f6e45e commit aadfa19

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

delete.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
require "core.php";
3+
4+
if(isset($_GET["id"])) {
5+
$stu_id = $_GET["id"];
6+
$sql = "DELETE FROM `student` WHERE `stu_id` = " . $stu_id;
7+
8+
if($mysqli->query($sql)) {
9+
printf("insert successfully.<br>\n");
10+
}
11+
if($mysqli->errno) {
12+
printf("Could not insert: %s<br>\n", $mysqli->error);
13+
}
14+
}
15+
16+
header("Location: index.php");
17+
exit();

0 commit comments

Comments
 (0)