在phpmyadmin中运行一下看看是不是有错.

解决方案 »

  1.   

    函数没用错?
    mysql_query($sql);
    ???
      

  2.   

    ('$user_name','$user_password','$record_type','$member_type','
    $name_in_credit_card','$Email','$Phone','$address1','$address2','$City','$Province','$Country','
    $Zipcode','$user_Parents_id')";
    确定你的这些变量都获得了相关的values???
      

  3.   

    提示成功插入
    -----
    在哪儿提示插入成功??
    执行mysql_query($sql) or die($sql);
    如果数据插入有错误会打印sql语句
      

  4.   

    echo mysql_error();
    看看有没有提示
      

  5.   

    ......
    tab_user(user_name,user_password,record_type,member_type,
    name_in_credit_card,Email,Phone,address1,address2,City,Province,Country,
    Zipcode,user_Parents_id,) values
    ......
    好像你的user_Parents_id后面多了个逗号符:[,]
    不知道是不是这个的原因?
      

  6.   

    还有
    确定你的tab_user表中有
    user_name,user_password,record_type,member_type,
    name_in_credit_card,Email,Phone,address1,address2,City,Province,Country,
    Zipcode,user_Parents_id
    这些字段
      

  7.   

    $sql="INSERT into tab_user(user_name,user_password,record_type,member_type,name_in_credit_card,Email,Phone,address1,address2,City,Province,Country,
    Zipcode,user_Parents_id) values
    ('".$user_name."','".$user_password."','".$record_type."','".$member_type."','
    ".$name_in_credit_card."','".$Email."','".$Phone."','".$address1."','".$address2."','".$City."','".$Province."','".$Country."','".$Zipcode."','".$user_Parents_id."')";碰到这种问题尽量自己耐心的去测试一下,测试多了以后遇到同种问题就有体会了!
      

  8.   

    在执行前看看语句是什么
    echo
    $sql="INSERT into tab_user(user_name,user_password,record_type,member_type,
    name_in_credit_card,Email,Phone,address1,address2,City,Province,Country,
    Zipcode,user_Parents_id)
     values
    ('$user_name','$user_password','$record_type','$member_type','
    $name_in_credit_card','$Email','$Phone','$address1','$address2','$City','$Province','$Country','$Zipcode','$user_Parents_id')";看看是不是你要的数值