日期:2014-05-17  浏览次数:20587 次

php中修改信息出现错误,信息修改不了
页面:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
<div class="top">
<?php
error_reporting(E_ALL & ~E_NOTICE);
include_once("../include/conn.php") ;
$com_id=$_GET["com_id"] ;
$mysql="select * from com_table where com_id='$com_id'" ;
$str=mysql_fetch_object(mysql_query($mysql)) ;
$show_number=iconv("gb2312" , "utf-8//IGNORE" , $str->com_number) ;
$show_name=iconv("gb2312" , "utf-8//IGNORE" , $str->com_name) ;
$show_telephone=iconv("gb2312" , "utf-8//IGNORE" , $str->com_telephone) ;
$show_mobile=iconv("gb2312" , "utf-8//IGNORE" , $str->com_mobile) ;
$show_qq=iconv("gb2312" , "utf-8//IGNORE" , $str->com_qq) ;
?>
<form name="myform" method="post" action="">
<input type="hidden" name="com_id" value="<?php echo $str->com_id ; ?>" /></br>
<table width="0" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td>账号:</td>
    <td><input name="com_number" type="text" value="<?php echo $show_number ;?>"></td>
  </tr>
  <tr>
    <td>姓名:</td>
    <td><input type="text" name="com_name" value="<?php echo $show_name ;?>"></td>
  </tr>
  <tr>
    <td>固定电话:</td>
    <td><input type="text" name="com_telephone" value="<?php echo $show_telephone ;?>"></td>
  </tr>
  <tr>
    <td>移动电话:</td>
    <td><input type="text" name="com_mobile" value="<?php echo $show_mobile ;?>"></td>
  </tr>
  <tr>
    <td>QQ:</td>
    <td><input type="text" name="com_qq" value="<?php echo $show_qq ;?>"></td>
  </tr>
  <tr>
    <td colspan="2" style="text-align:center">
  <input type="submit" name="submit" value="OK">
      <input type="reset" name="reset" value="reset">
   </td>
  </tr>
</table>
<?php
if(isset($_POST["submit"])){
/*
$com_number=trim($_POST["com_number"]) ;
//$com_pwd=trim($_POST["password"]) ;
$com_name=trim($_POST["com_name"]) ;
$com_telephone=trim($_POST["com_telephone"]) ;
$com_mobile=trim($_POST["com_mobile"]) ;
$com_qq=trim($_POST["com_qq"]) ;
*/
$com_number=iconv("utf-8" , "gb2312//IGNORE" , $_POST["com_number"]) ;
//$com_pwd=iconv("utf-8" , "gb2312//IGNORE" , $com_pwd) ;
$com_name=iconv("utf-8" , "gb2312//IGNORE" , $_POST["com_name"]) ;
$com_telephone=iconv("utf-8" , "gb2312//IGNORE" , $_PO