From 387012735ff1189acede613366b28c361dd72638 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Sat, 27 Jul 2013 02:26:29 +0200 Subject: [PATCH] Split it up a bit more and added a way to find and edit posts --- config.php => includes/config.php | 0 includes/dbconnect.php | 11 ++++++++++ index.php | 11 +++------- user/createpost.php | 10 ++------- user/editpost.html | 14 ++++++++++++ user/editpost.php | 36 +++++++++++++++++++++++++++++++ user/newpost.html | 2 +- user/updatepost.php | 22 +++++++++++++++++++ 8 files changed, 89 insertions(+), 17 deletions(-) rename config.php => includes/config.php (100%) create mode 100644 includes/dbconnect.php create mode 100644 user/editpost.html create mode 100644 user/editpost.php create mode 100644 user/updatepost.php diff --git a/config.php b/includes/config.php similarity index 100% rename from config.php rename to includes/config.php diff --git a/includes/dbconnect.php b/includes/dbconnect.php new file mode 100644 index 0000000..4c4550c --- /dev/null +++ b/includes/dbconnect.php @@ -0,0 +1,11 @@ + diff --git a/index.php b/index.php index fde24a0..4d57df9 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,9 @@ Edit post + + +
+Date: (YYYY-MM-DD) +
+Title: +
+ +
+ + + + diff --git a/user/editpost.php b/user/editpost.php new file mode 100644 index 0000000..036dcfc --- /dev/null +++ b/user/editpost.php @@ -0,0 +1,36 @@ + +Post number:
+Date: (YYYY-MM-DD) +
+Title: +

+Text:
+ +
+ +"; +} + + +// Close MySQL link +mysql_free_result($result); +mysql_close($link); + + +?> diff --git a/user/newpost.html b/user/newpost.html index 27297ad..7a9710b 100644 --- a/user/newpost.html +++ b/user/newpost.html @@ -9,7 +9,7 @@ Title: Text:

- + diff --git a/user/updatepost.php b/user/updatepost.php new file mode 100644 index 0000000..ed25efe --- /dev/null +++ b/user/updatepost.php @@ -0,0 +1,22 @@ +