aboutsummaryrefslogtreecommitdiff
path: root/dopost.php
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2012-10-10 20:03:21 +0100
committerNathan Lasseter <nathan@4574.co.uk>2012-10-10 20:03:21 +0100
commit94c589ed55b20a581810e126b20fdc2d67c68221 (patch)
tree7d3d84aa3cc291417f667ee48a3fc120b95b2e43 /dopost.php
Initial commit
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}");
+?>