这里不知道出了什么原因,就这样子复制下来的代码也会变。
大家注意一下这部分
                                                               
<form name="form1" method="post" action="<?php echo $PHP_SELF."?type=".$_GET["type"];?>">
  <input name="intxt" type="text" id="intxt" onBlur="form1.submit()">
  <input name="oldintxt" type="hidden">
</form>
<script language="JavaScript">
 form1.intxt.focus();
</script>当中的
action="<?php echo $PHP_SELF."?type=".$_GET["type"];?>"?type= 都复制不下来,没有这个的话就无法使用了。顺利说一下我这个代码的功能:
就是在当前位置添加修改和删除资料。conn.php
================
<?php
$temp = mysql_pconnect("主机名", "用户名", "密码");
$database_temp = "temp";
?>

解决方案 »

  1.   

    我觉得用PEAR中的HTML_QuickForm_Controller来实现会更快一些,看到它里面的例子都是一个文件操作多个动作的。
      

  2.   

    !!!!! BUG !!!!!
    $result=mysql_query($query,$temp) or die(mysql_error());
    if(!$result)
    echo "<script>alert('删除失败,请重试!');location.href = '".$PHP_SELF."';</script>";当 query 查询字串是 UPDATE、INSERT 及 DELETE 时,传回的可能是 true 或者 false。当传回 false 时,并不是执行成功但无传回值,而是查询的字串有错误。
    所以你应该用mysql_affected_rows来判断是否删除成功
    if(mysql_affected_rows() == 0)
      echo "<script>alert('删除失败,请重试!');location.href = '".$PHP_SELF."';</script>";而sql串的错误已造成or die(mysql_error());的执行
      

  3.   

    好啊,可以弄的和phpadmin一样好哦