标题: php 有错误吗
时间: 2014-08-19
<html>
<?php
include("top.php");
include("conn.php");
?>
<head>
<title>网站后台</title>
</head>
<body>
<form action="?ac=1" method="post">
标题:<input type="text" name="bt" /><br />
内容:<textarea row="17" col="30" name="content"></textarea><br />
<input type="submit" value="发表" />
</form><hr />
<?php
if($_GET["ac"]==1){
$sql1="insert into content(bt,content) values($_POST['bt'],$_POST['content'])";
if(mysql_query($sql1,$con){
echo "<script>alert('内容已成功发表!')</script>";
}else{
echo "<script>alert('内容发表失败!')</script>";
}
}
?>
</body>
</html>
『回复列表(8|隐藏机器人聊天)』