Home > Backend Development > PHP Tutorial > PHP lists data and then uses js to delete data_PHP tutorial

PHP lists data and then uses js to delete data_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-20 11:06:48
Original
882 people have browsed it

php列出数据再用js 删除数据

include("../inc/inc.php");
islogin();
$Db = new Db();
?>




增加城市分类





 
 
 
   
   
   
 
  $id = PostGet('aid');
if( !is_numeric( $id ) )
{
exit;
}
$query = $Db->query("Select upid,cntitle,orderid,id from cn_loupan_city where upid='$id' order by orderid asc");
  if( $Db->rows( $query ) )
  {
   $row = $Db->fetch( $query ,0);
   
   foreach( $row as $array => $_v )
   {
 ?>
 
 
   
   
   
  
  
  }
}
?>
 

 {}
地区管理
 
地区名称排序位置

   保存|
   删除


< ;/body>


public.php
function deletes()
{
$id = PostGet('id');
$aid =PostGet('aid');
$cn = urlencode(PostGet('cname'));
if( !is_numeric( $id ) )
{
exit;
}
else
{
$Db = new Db();
try{
$Db->query("Delete from cn_loupan_city where id='$id'");
MessAge('Operation successful','type.php?aid='.$aid.'&cname='.$cn);
}catch(Execption $e){
MessAge('Operation failed ! ');
}
$Db->close();
}
}

Original reprints on this site are marked www.111cn.cn


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445018.htmlTechArticlephp lists the data and then uses js to delete the data?php include(../inc/inc.php); islogin (); $Db = new Db(); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xht...
Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template