Split it up a bit more and added a way to find and edit posts

This commit is contained in:
2013-07-27 02:26:29 +02:00
parent 4847b5f4d7
commit 387012735f
8 changed files with 89 additions and 17 deletions

22
user/updatepost.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
// Include config file
require "../includes/config.php";
require "../includes/dbconnect.php";
$query = "UPDATE blog SET date='$_POST[date]', title='$_POST[title]',
posttext='$_POST[post]' WHERE postnumber='$_POST[postnumber]'";
if (!mysql_query($query))
{
die ("Something went wrong!");
}
print "Post updated";
// Close MySQL link
mysql_close($link);
?>