$id = $_GET[''id'']; //获得参数
$sql = "SELECT * FROM posts WHERE postid = $id"; //定义SQL
mysql_connect("localhost", "root"); //连接服务器
mysql_select_db("guestbook"); //连接数据库
$rs = mysql_query($sql); //执行SQL
if(mysql_numrows($rs)) //如果记录存在,则输出
{
$row_rs = mysql_fetch_assoc($rs);
echo "TOPIC: ".$row_rs[''topic'']."
";
}
else