在你的登陆面里。PHP跟数据库连接。新闻要放在那里。做一个程序。一就你所想要的面读取数据库里的新闻。对于新闻的更新。可以再写一个后台程序。来管理新闻,对其进行增删改。

解决方案 »

  1.   

    新建一个临时表,用户每次点击新闻自动记录下新闻的id和用户的actionTime,然后加以判断。
    自动显示数据库内容就更简单了,打开新页面或者是刷新页面时从数据库里调用,然后echo出来就可以了吧?不明白?说具体的吧……我也不是很明白你的问题……不过,我等分:)
      

  2.   

    从数据库动态构建页面是asp、php等的基本技术,建议楼主先学习一下
      

  3.   

    I assume the workflow is1. after user login, load the recent 10 news from DB and do a representation. each link contains two parameters like http://ip:port/main.php?sessionid=xxxxxxxx&type=news&newsid=17 (for example)2. once the user clicks the link, it passes the two parameters to main.php.
    so, in main.php, 
    first:
    validate session by $_GET['sessionid'] and check out the user's id.
    or by checking cookie if u prefer..second:
    if($_GET['type']=="news" && $_GET['newsid']>0)
    {
      check whether the news of the id is available in ur table.
      if no, return an error msg
      if yes
      {   
        insert a record including user_id, news_id, timestamp and so on
        return the page with the selected news
      }
    }
    else
    {
      return the page with the ten recent news..
    }with best wishessandy