<?
$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 '您的修改已经成功!';
'<a class='content' href=index.html>返回</a>';
}else
{
echo('
<script>
window.alert( '修改出错,请检查输入是否有误,谢谢 !!!' )
history.go(-1)
</script>
');
exit;
}
?>
$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 '您的修改已经成功!';
'<a class='content' href=index.html>返回</a>';
}else
{
echo('
<script>
window.alert( '修改出错,请检查输入是否有误,谢谢 !!!' )
history.go(-1)
</script>
');
exit;
}
?>
我想使这错了。
$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 "\'您的修改已经成功!\'
<a class=\'content\' href=index.html>返回</a>";
}else
{
echo('
<script lanauage="JavaScript">
alert( "修改出错,请检查输入是否有误,谢谢 !!!" );
history.go(-1);
</script>
');
exit;
}
}
?>
建议你用个好的编辑器。
$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 "\'您的修改已经成功!\'
<a class=\'content\' href=index.html>返回</a>";
}else
{
echo('
<script lanauage="JavaScript">
alert( "修改出错,请检查输入是否有误,谢谢 !!!" );
history.go(-1);
</script>
');
exit;
}
}
?>
建议你用个好的编辑器。
不知道大家喜欢用什么。
'<a class='content' href=index.html>返回</a>';
你自己看看这两行,第一行后有一个";",那说明echo已经结束了,那第二行是做什么的?你知道,编译器可不知道~~ echo('
<script>
window.alert( '修改出错,请检查输入是否有误,谢谢 !!!' )
history.go(-1)
</script>
');再看这里,在“修改出错”前面的"已经把echo语句终止了,编译器现在需要的是一个;号,你却给他一大堆字符,你说编译器能不和你急吗??我都急了~~用良好的编辑器可以一眼看出这样的问题,比如editplus,你要是看见你哪行代码的终止符是桃红色,那就说明你的字符串拼接肯定有问题。我就是用的editplus,所以一眼就看出你的问题来了~~
右下角的四个chekcbox中的第一个就是