require("./include/init.php");
$sql="insert into thread (username,title,content,pubtime) values (‘".$_POST[‘username‘]."‘,‘".$_POST["title"]."‘,‘".$_POST[‘content‘]."‘,".time().")";
if($_POST[‘username‘]==null||$_POST["title"]||$_POST[‘content‘]){
echo "发帖失败,信息不全";
exit("返回重发");
}
$rs=mysql_query($sql,$conn);
$index=mysql_insert_id($conn);
echo $index;
if($rs){
echo "发送成功";
echo "查看";
}
?>
require("./include/init.php");
$sql="insert into reply (username,tid,content,reptime) values (‘".$_POST[‘username‘]."‘,‘".$_POST["tid"]."‘,‘".$_POST[‘content‘]."‘,".time().")";
if(($_POST["content"]=="")||$_POST[‘username‘]==‘‘){
echo "回复失败";
}else{
$rs=mysql_query($sql,$conn);
if($rs){
echo "回复成功"; }
}
echo "返回";
// $index=mysql_insert_id($conn);
// echo $index;
?>