show

代码
<?php
session_start();
if($_SESSION["issession"]!=true)
    {
    
echo "<a href=login.php>重新登录</a>";
    
exit;
    }
$id=$_GET['id'];
$link = mysql_connect("localhost:3306","student","123456");
mysql_select_db('test');

$query = "select * from tieba where id='$id'";
$result = mysql_query($query);
$row=mysql_num_rows($result);
if(mysql_num_rows($result)>0)
    {
    
$row=mysql_fetch_array($result,MYSQL_ASSOC);
    
echo "<p>作者:".$row["tname"]."</p>";    
    
echo "<p>内容:".$row["tword"]."</p>";    
    
echo "<p>时间:".$row["ttime"]."</p>";    
    }
else
    {

 
echo "没有内容";

    }
?>


posted @ 2010-11-13 11:22  xiao.ji  阅读(109)  评论(0编辑  收藏  举报