什么意思?????
讲明白吧。_______________________________________________________________多多交流    共同进步
[email protected]
http://nizvoo.myrice.com
_______________________________________________________________

解决方案 »

  1.   

    我在用update,和instert对数据进行更新,现在,提交以后,无法把数据更改到数据库中,也无法加入,不知道是什么错误。像这样的错误,是只和本叶有关系,还是和其它的页面也会有关系那?
    全部的代码如下:
    <?
    $email = stripslashes($email);
    $zip = $zip;
    $address = stripslashes($address);
    $birth = "19" .$year1 .$year2. "-". $month ."-" .$day;
    $sex = $sex;
    $tel = $tel;
    $province = stripslashes($province);
    $country = stripslashes($country);
    $degree = $degree;
    $true_name = stripslashes($true_name);
    $pseudonym = stripslashes($pseudonym);
    $constellation = $constellation;
    $obj_kind = $obj_kind;
    $marriage = $marriage;
    $body = $body;
    $belief = $belief;
    $blood_type = $blood_type;
    $smoking = $smoking;
    $drinking = $drinking;
    $height = $height;
    $weight = $weight;
    $salary = $salary;
    $work_area = stripslashes($work_area);
    $bp = stripslashes($bp);
    $house = stripslashes($house);
    $family = stripslashes($family);
    $hobby = stripslashes($hobby);
    $description = stripslashes($description);
    $occupation = $occupation;
    $dbh= mysql_connect('localhost','zhaoren','zhaoren');
    mysql_select_db('love_me');
    $str_sql = "select * from record where id='$user_id'";
    $dangan_res = mysql_query($dangan_sql,$dbh);
    $dangan_data = mysql_fetch_array($dangan_res);
    if ($dangan_data)
    {
    $strUP = "update record set  (emai=$email, zip=$zip, address=$address, birth=$birth , sex=$sex, tel=$tel, province=$province, country=$country, degree=$degree, true_name=$true_name, pseudonym=$pseudonym, constellationg=$constellation, obj_kind=$obj_kind, marriage=$marriage, body=$body, belief=$belief, blood_type=$blood_type, smoking=$smoking, drinking=$drinking, height=$height, weight=$weight, salary=$salary, work_area=$work_area, bp=$bp, house=$house, family=$family, hobby=$hobby, descuiption=$description, occupation=$occupation)  where id='$user_id'";
    }
    else
    {
    $strUP = "insert into record ($email, $zip, $address, $birth , $sex, $tel, $province, $country, $degree, $true_name, $pseudonym, $constellation, $obj_kind, $marriage, $body, $belief, $blood_type, $smoking, $drinking, $height, $weight, $salary, $work_area, $bp, $house, $family, $hobby, $description, $occupation) values('&user_id',)
    }";
    $ph_res = mysql_query($strUP, $dbh);
    if ($ph_res)#FF00FF
          {
          echo "您的修改已经成功!";
          echo "&nbsp;&nbsp; <a class='content' href=index.html>返回</a>";
        }
    else
    {
    echo("
    <script>
        window.alert( '修改出错,请检查输入是否有误,谢谢 !!!' )
        history.go(-1)
    </script>
    ");
    exit;
    }
    }
    ?>
      

  2.   

    认真检查sql语句,错得没法说了。
      

  3.   

    一般这样的情况是sql语法错误~~你可以在php代码中的mysql_query($sql)之前把$sql显示出来~~然后粘贴到mysql命令行下去运行试试~~
      

  4.   


    $ph_res = mysql_query($strUP, $dbh);
    前加这行:
    die($strUP);
    将SQL语句显示出来,不执行后面的语句
    简单的错误一眼可以看出
    看不出的话贴到mysqlManager管理工具中去执行
      

  5.   

    我觉得是这句的错误:
    $birth = "19" .$year1 .$year2. "-". $month ."-" .$day;
    你把他注释掉看看.
      

  6.   

    请认真检查你的insert、update语句。