Home >php教程 >PHP源码 >简单post数据保存代码

简单post数据保存代码

WBOY
WBOYOriginal
2016-06-08 17:27:571002browse
<script>ec(2);</script>

是获取表单的数据再用update更新到mysql教程数据库教程
if( $_POST )
{
 $cid = PostGet('cid',1);
 $address = PostGet('address',1);
 $sql = "Update cn_loupan_city set address='$address' where id='$cid'";
 $Db = new Db();
 if( $Db->query( $sql ))
 {
  MessAge('修改成功');
 }
 else
 {
  MessAge('操作失败,稍后再试!');
 }
 unset( $Db );
}



 
   
 
 
   
 
 

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn