本帖最后由 YZ7891 于 2010-03-19 15:55:23 编辑

解决方案 »

  1.   

    echo ("<form action='10.php' method='post'>");刚才看看楼主发的其他帖子  都没有结贴     
      

  2.   

    <?php ?>
    <html>
    <?php ?>
    这样
      

  3.   

    弄好了 谢谢你了
    我从这里也看到了
    http://hi.baidu.com/pengpeng5047/blog/item/8a2a1ff46e7fab2ebc3109f5.html<html>
    <body>
    <?php
    $con=mysql_connect("localhost","root","zhuyun0000");
    if(!$con)
    {
    die("对不起,数据库连接失败!请查询:".mysql_error());
    }
    if($_GET[Xname]!=null)
    {
    mysql_select_db("yz7893",$con);
    $sql=mysql_query("select * from person where Name='$_GET[Xname]'");
    $row=mysql_fetch_array($sql);
    if($row['Name']!=null)
    {
    echo ("<form action='10.php' method='post'>");
    echo ("<table border=1px>");
    echo ("<tr><th>姓名</th><th>年龄</th><th>地址</th></tr>");
    echo ("<tr><td><input type='text' name='Name' value='{$row['Name']}' /></td><td><input type='text' name='Age' value='{$row['Age']}' /></td><td><input type='text' name='Address' value='{$row['Address']}' /></td></tr>");
    echo ("<input type='submit' name='submit' value='修改' />");
    echo ("</table></form>");
    }
    else
    {
    echo ("对不起,没有找到您需要的数据");
    echo ("<a href='6.html'>返回</a>");
    }
    }
    else
    {
    die("对不起,请不要输入空值");
    }
    ?>
    </body>
    </html>