如果做到了你说的,那不会出现这个问题,所以还是你的代码有误,最简单的你在sql语句之间再做一次传值判定,!=''就可以了

解决方案 »

  1.   

    function CheckForm()
    {
    Telcheck = /^[\d-() ]*$/
    Mailcheck = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
    Numcheck = /^\d{1}$/
    if(document.form1.name.value == "")
    {
    alert("\Please Enter Your Name!\n"); 
    return false;
    }
    if(document.form1.tel.value == ""||!Telcheck.test(document.form1.tel.value))
    {
    alert("\Please Enter Valid Tel Number Using the format we give!\n");
    return false;
    }
    if(!Mailcheck.test(document.form1.email.value))
    {
    alert("\Please make sure you have the @ symbol in the e-mail address and e-mail address ends with .com or .net or other valid suffix!\n");
    return false;
    }
    }这个是js的一般php的话,最好用什么语句来控制?一样用正则么?
      

  2.   

    还是上面的话,如果你的判断机制没有问题,那可能是前后有问题,比如传值问题,比如if,while的判断问题。所以在测试的时候先这样,你要判断的是email,那么在JS中用alert看看能不能取到你所要测的email(或是用echo在PHP源码中看看能不能取到你想要的email值,如果这一步可以,那么再来看你的check做的对不对,值取到了,就是check函数的问题,值取不到,就先解决这个问题。
      

  3.   

    遇到类似的问题,使用了Html edit控件,通过js改变其中的内容,提交后,IE提交内容没有改变,FF提交的内容是正确的。不知道是什么原因
      

  4.   

    $reg_info = array_flip($_POST);
    if (isset($reg_info[''])){
        echo "不允许提交空值"
    }这样把
      

  5.   

    你是用什么浏览器的?我一般不使用:
    if(document.form1.name.value == "")
    {
        alert("\Please Enter Your Name!\n"); 
        return false;
    }我会用类似input=document.getElementById(),然后value=input.value这样的方法。