<?php$host='localhost'; 
$user='root'; 
$pwd='123456'; 
$db='bbs'; 
$conn=mysql_connect($host,$user,$pwd) or die("不能连接到服务器"); 
mysql_query("set names gbk"); 
mysql_select_db($db,$conn); 
//获取id的值 
$id=$_GET['id']; 
//查询并显示 
$sql="select text,work from bbs_txt where id=".$id; 
 
$result=mysql_query($sql,$conn) or die('查询错误'); 
$row=mysql_fetch_array($result); 
$text=$row['text']; 
$work=$row['work']; echo "$text"; 
echo "$work";?>
$id=$_GET['id']; 你写成了$id=$GET['id'];