Split it up a bit more and added a way to find and edit posts
This commit is contained in:
22
user/updatepost.php
Normal file
22
user/updatepost.php
Normal 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);
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user