php列出数据再用js 删除数据
include("../inc/inc.php");
islogin();
$Db = new Db();
?>
< ;/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