simplog/user/updatepost.php

31 lines
536 B
PHP

<?php
// Include config file
require "../includes/config.php";
require "../includes/dbconnect.php";
require "../includes/htmlcode.php";
start_html("Post updated");
include "../includes/login.inc";
$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";
?>
<br/>
<a href="../index.php">Back to simplog</a>
<?php
// Close MySQL link
mysql_close($link);
end_html();
?>