<?
header('Content-Type:   text/html;   charset=utf-8');
		include("config/connect.php");
		include("functions.php");
		$uid = $_SESSION["userid"];
		$username = $_SESSION["username"];
		$cid = $_GET["cid"];
		$cont = strval($_GET["cont"]);

        $now=time();
		$sql = "INSERT INTO chat(bid,content,addtime,username,user_id) VALUES ($cid,'".$cont."',$now,'".$username."',$uid)";

		$q = mysql_query($sql) or die ("insert error".mysql_error());
				

		
	echo '[{"result":"success"}]';
?>
