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

简单post数据保存代码

WBOY
Release: 2016-06-08 17:27:57
Original
1002 people have browsed it
<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 );
}



 
   
 
 
   
 
 

 

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template