很简单啊 ,你取出这条数据的时候,你肯定能得到这条数据的的ID,然后在“点击这个编辑按钮”的时候把ID当成参数传过去,检索出数据,当你编辑完成提交的时候,同样利用这个ID修改这条数据库记录啊update tablename set ........... where id = '$id';  //提交修改

解决方案 »

  1.   

    OK.<?PHPif($HTTP_POST_VARS['title']){  这里写 update}?>
    <html>
    <head><title></title>
    </head>
    <body>
    <?php
    $getID=$HTTP_GET_VARS['id']
    $queryString="select id,title,content from article where id=$getID";
    $queryResult=@mysql_query($queryString);
    $queryArray=@mysql_fetch_array($queryResult);
    ?>
    <form method="post" action="">
    <input type="text" name="title" value="<?php echo $queryArray[title];?>">
    <input type="textarea" name="content" value="<?php echo $queryArray[content];?>">
    <input type="submit">
    </form>
    </body>
    </html>
      

  2.   

    如果我这条记录是从两个表中查询得来的,编辑修改后,怎么才能让其分别保存在各在的表中,这个update语句怎么写??
      

  3.   

    如果我这条记录是从两个表中查询得来的,编辑修改后,怎么才能让其分别保存在各在的表中,这个update语句怎么写??
      

  4.   

    update 表名 set 列名=$????? where id=?