PHP source code for batch review and batch deletion
Jul 06, 2016 pm 01:28 PM
Jump to
[1]
[Full screen preview]
<form name="form1" method="post" action="manage.php?act=sub"> <input type="checkbox" name="mm[]" value="<?=$row['0']?>" onClick="checkItem(this, 'mmAll')"> <!--checkbox 實(shí)現(xiàn)選擇多條記錄--> <input type="submit" name="Submit" value="刪除" onClick="return(confirm('確認(rèn)要?jiǎng)h除嗎?'))"> </form> //JS實(shí)現(xiàn)全選/不全選的代碼 <script language=Javascript> function checkAll(e, itemName) { var aa = document.getElementsByName(itemName); for (var i=0; i<aa.length; i++) aa[i].checked = e.checked; } function checkItem(e, allName) { var all = document.getElementsByName(allName)[0]; if(!e.checked) all.checked = false; else { var aa = document.getElementsByName(e.name); for (var i=0; i<aa.length; i++) if(!aa[i].checked) return; all.checked = true; } } </script> $num=$_POST['mm'];//這里得到一個(gè)POST數(shù)組; $str=implode(',', $num); 把數(shù)組值分開(kāi); $query="delete from `ad` where `id` IN(${str});"; //SQL語(yǔ)法,IN條件語(yǔ)句;
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

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
Guide: Stellar Blade Save File Location/Save File Lost/Not Saving
4 weeks ago
By DDD
Oguri Cap Build Guide | A Pretty Derby Musume
2 weeks ago
By Jack chen
Agnes Tachyon Build Guide | A Pretty Derby Musume
2 weeks ago
By Jack chen
Dune: Awakening - Advanced Planetologist Quest Walkthrough
4 weeks ago
By Jack chen
Date Everything: Dirk And Harper Relationship Guide
4 weeks ago
By Jack chen

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
