-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteSikdan.php
More file actions
34 lines (25 loc) · 863 Bytes
/
deleteSikdan.php
File metadata and controls
34 lines (25 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
header("Content-Type:text/html;charset=utf-8");
$host = '127.0.0.1';
$user = 'root';
$pw = 'chanki';
$dbName = 'healthcare';
$port = 3306;
$mysqli = new mysqli($host, $user, $pw, $dbName,$port);
$id=$_GET['id'];
if($mysqli == false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$mysqli->set_charset("utf8");
$sql_sikdan= "delete from sikdan WHERE num={$id};";
if( $res_auth = $mysqli ->query($sql_sikdan)){
echo "<script> alert('삭제 완료하였습니다.'); location.href='./mypage_dashboard.php'; </script>";
}
else{
echo "<script> alert('실패했습니다.'); location.href='./mypage_dashboard.php'; </script>";
echo "Query: " . $sql . "\n";
echo "Errno: " . $mysqli->errno . "\n";
echo "Error: " . $mysqli->error . "\n";
exit;
}
?>