Location: PHPKode > projects > Modular Site Manager > htdocs/misc/forums.edit1.php
<?php
chdir("../");
include "inc/functions.inc.php";
$mysql = new mysql(DB_MAIN);
$sel = $mysql->select(PRE."forums_posts", "id='".$_POST['postid']."'", "id");
$sel2 = $mysql->select(PRE."forums_threads", "id='".$_POST['threadid']."'", "id");
$a = mysql_fetch_assoc($sel);
$b = mysql_fetch_assoc($sel2);
if(empty($_POST['post']))
{
	$message = $a["message"];
} else {
	$message = $_POST['post'];
}
if(empty($_POST['subject']))
{
	$subject = $b['subject'];
} else {
	$subject = $_POST['subject'];
}
$thread = $_POST['threadid'];
$mysql->update(PRE."forums_posts", "message='".strip_tags($message)."'", "id='".$_POST['postid']."'");
$mysql->update(PRE."forums_threads", "subject='".strip_tags($subject)."'", "id='".$_POST['threadid']."'");
$mysql->close();
header('Location: '.SITE_URL.'Forums/Thread/'.$thread.'/');
?>
Return current item: Modular Site Manager