echo "<a href=\"/manager/readnews.php?id=1\">测试</a>";楼主要的是不是这个??

解决方案 »

  1.   

    ???
    <a href="manager/newsread.php?id=*">@@@@@</a>
    *就是你想要的数字!
    如果是变量!
    就<a href="manager/newsread.php?id=$*">@@@@@</a>
      

  2.   

    我想要编写一个PHP程序:readnews.php。但是我是初学PHP,不知道如何才能在程序中得到类似该链接中id的值,数据库我已经写好了,只想在点击该链接后可以阅读id=1的文章。
      

  3.   

    不好意思!!
    写错了!!如果是变量。应该是:就<a href="manager/newsread.php?id=<? $*?>">@@@@@</a>
      

  4.   

    我想要编写一个PHP程序:readnews.php。但是我是初学PHP,不知道如何才能在程序中得到类似该链接中id的值,数据库我已经写好了,只想在点击该链接后可以阅读id=1的文章。-------------------你读出那条记录生成链接的时候把id号也读出来不就可以了?如设你的表的ID号放在字段id,标题放在字段title$sql="select id,title from your_table";
    $query=mysql_query($sql);
    while(list($id,$title)=mysql_fetch_row($query))
    {
      echo "<a href=xxxx.xxxx.xxx?id=$id>$title</a>";
    }这样就可以了其中xxxx.xxx.xxx是你的地址