首頁 >後端開發 >php教程 >删除前添加确认删除弹出框_PHP教程

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

WBOY
WBOY原創
2016-07-13 10:39:431064瀏覽

简单的很~

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