<td>
<a href="{php echo $this->createWebUrl('inviolable_jl', array('dopost'=>'del','time'=>$val[uestime]))}" onclick="if(confirm('确认删除此条权益吗?')){return true}else{return false};"><i class="fa fa-remove"></i> 删除</a>
</td>
前端传过来的值是$_GPC[‘time’],跟数据表中的值对应上就可以完成操作。
对应不准确的话会出错或者没反应。
if($_GPC['dopost'] == "del"){
pdo_delete(GARCIA_PREFIX.'myinviolable',array("uestime"=>$_GPC['time']));
message('删除成功', $this->createWebUrl('inviolable_jl'), 'success');
}
include $this->template('web/inviolable_jl');