下面是改过的程序<?
$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;
$dbl = mysql_connect('localhost','zhaoren','zhaoren');
mysql_select_db('love_me');
$strSQL = "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  ($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)  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)
      { 
      echo "您的修改已经成功!";
echo "<a class='content' href=index.html>返回</a>";
    }else
{
echo "<script>window.alert( '修改出错,请检查输入是否有误,谢谢 !!!' )history.go(-1)</script>";
exit; 
}
?>