PHP链接问题,郁闷,请大家帮帮忙
<?
print "<a href=\"showMsg.php?id=$messageId\">$messageTitle</a>";
?>
想点击帖子标题然后显示帖子内容
///// showMsg.php
<?
require"config.ini"; //配置文件
$conn=mysql_connect($host,$dbuser,$dbpwd)or die(不能连接到数据库);
mysql_query("SET NAMES 'GB2312'");
$sql="select title,poster,content,time from bbs_message where
id=$messageId";
$result=mysql_db_query($dbname,$sql);
$r=mysql_fetch_row($result);
$msgPoster=$r["poster"];
$msgTitle=$r["title"];
$msgContent=$r["content"];
$msgTime=$r["time"];
?>
下面是html代码,显示内容部分 略
帖子是存在数据库里的
但是为什么得不到值呢????