summaryrefslogtreecommitdiff
path: root/addcomm.php
diff options
context:
space:
mode:
Diffstat (limited to 'addcomm.php')
-rw-r--r--addcomm.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/addcomm.php b/addcomm.php
new file mode 100644
index 0000000..6dbc29a
--- /dev/null
+++ b/addcomm.php
@@ -0,0 +1,32 @@
+<?php
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+?>
+<?php
+/* vim: set ts=4 sw=4 et : */
+
+require_once __DIR__ . "/check_auth.php";
+require_once __DIR__ . "/../includes/common.php";
+
+if (!isset($_POST['persid']))
+ exit(0);
+
+$sql = "INSERT INTO commissioners (Person) VALUES (?);";
+$stmt = $mysqli->prepare($sql);
+$stmt->bind_param('i', $_POST['persid']);
+$stmt->execute();
+$stmt->reset();
+$mysqli->close();
+
+echo "1";
+
+exit(0);