-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdone.php
More file actions
32 lines (24 loc) · 780 Bytes
/
Copy pathdone.php
File metadata and controls
32 lines (24 loc) · 780 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
<?php
echo "test";
header('Content-Type: text/plain; charset=utf-8');
include "../secret/secret.php";
$mysqli = new mysqli("localhost", $dbuser, $dbpass, "putzplan");
$mysqli->set_charset("utf8");
if ($mysqli->connect_errno) {
die("Verbindung fehlgeschlagen: " . $mysqli->connect_error);
}
$location = $_POST["location"];
// update anmerkungen
$sql = "UPDATE location SET Done = 1 WHERE Name = '".$location."'";
$stmt = $mysqli->stmt_init();
if ($stmt->prepare($sql)) {
$OK = $stmt->execute();
if ($OK) {
echo "Erfolg\r\n";
header('Location: https://patrickbollmann.de/putzplan/');
} else {
echo $stmt->error . "\r\n";
}
}
$mysqli->close();
?>