Location: PHPKode > projects > Modular Site Manager > htdocs/misc/blog-comment-in.php
<?
chdir("../");
include "inc/functions.inc.php";
$mysql = new mysql(DB_MAIN);
if(!$_POST['username'] || !$_POST['email'] || !$_POST['message'])
{
	header("Location: ".$HTTP_REFERER."&cerror");
} else {
	$mysql->insert(PRE."blog_comments", array('id', 'username', 'message', 'email', 'ip', 'date', 'user'), array($_POST['pid'], $_POST['username'], $_POST['message'], $_POST['email'], $_SERVER['REMOTE_ADDR'], time(), $_POST['user']));
}
header("Location: ".$HTTP_REFERER);
?>
Return current item: Modular Site Manager