aboutsummaryrefslogtreecommitdiff
path: root/dopost.php
diff options
context:
space:
mode:
Diffstat (limited to 'dopost.php')
-rw-r--r--dopost.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/dopost.php b/dopost.php
new file mode 100644
index 0000000..f4f43e5
--- /dev/null
+++ b/dopost.php
@@ -0,0 +1,15 @@
+<?php
+ require("settings.php");
+
+ if (!isset($_POST['title']) || !isset($_POST['content'])) {
+ header("location: {$blogRoot}post.php");
+ exit(0);
+ }
+
+ $file = $_POST['title'];
+ $content = $_POST['content'];
+
+ file_put_contents("{$blogPosts}$file", $content);
+
+ header("location: {$blogRoot}");
+?>