-
Notifications
You must be signed in to change notification settings - Fork 0
/
deleteUser.php
42 lines (36 loc) · 1.04 KB
/
deleteUser.php
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
35
36
37
38
39
40
41
42
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Διαγραφή Χρήστη</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "cyfoodmuseum";
$password = "9m8ESxZD";
$dbname = "cyfoodmuseum";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
parse_url(file_get_contents("php://input"), $_POST);
if (!$conn->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $conn->error);
die;
}
print_r($_POST);
$email = $_POST['diagrapsou'];
$sql= "DELETE FROM `USERS_FM` WHERE Email = '$email' ";
if ($conn->query($sql) === TRUE) {
echo "true";
}
$result=$conn->query($sql);
mysqli_close($conn);
header("Location:manageUsers.php");
die;
?>
</body>
</html>