首页  >  文章  >  后端开发  >  删除前添加确认删除弹出框_PHP教程

删除前添加确认删除弹出框_PHP教程

WBOY
WBOY原创
2016-07-13 10:39:431050浏览

简单的很~

html页面

<span <</span><span a </span><span href </span><span ="你操作php删除文件的路径"</span><span  onclick</span><span =" {if(confirm('你确定要删除<?php echo $v['username']?>吗?')){rentrn true;}return false;}"></span><span 删除</a</span><span ></span>

php文件

<span if</span>(<span $_GET</span>['do']==<span del){
</span><span $id</span> = <span $_GET</span>['id'<span ];
</span><span $sql</span> = "delect from 数据库 where id = ".<span $id</span><span ;
</span><span $dsql</span>->ExecuteNoneQuery(<span $sql</span><span );
    </span><span echo</span> "<script> alert('删除成功!');window.location.href='student_voice.php';</script>"<span ;
}</span>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/729833.htmlTechArticle简单的很~ html页面 php文件 ( ['do']== = ['id' = "delect from 数据库 where id = ". -ExecuteNoneQuery( "script alert('删除成功!');window.location.href='student_voi...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn