Make another page to do the insert operation.

解决方案 »

  1.   

    我可能没说清楚,我是想知道insert和select在同一个页面要怎么做?
      

  2.   

    或者加上cookie和timestmap,防止一定时间内多次提交还有就是提交完后跳转到其它页面
      

  3.   

    先查询
    如果数据库有相同的就退出
    没有就插入$sql="select * from user where name='$name'";
    //echo $sql;
    $result=mysql_query($sql);
    $row=mysql_num_rows($result);
    //echo $row,"|";
    if ($row>0)
    echo "<script>alert('用户名重复!');history.back();</Script>";
    else
    插入
      

  4.   

    也可以在页面带一个时间
    如果时间相同就不插入
    ----------
    iasky(C#_ASP_PHP)
    或者加上cookie和timestmap,防止一定时间内多次提交还有就是提交完后跳转到其它页面