php使用check box
if (isset($_POST['submit'])) {
foreach ($_POST['todelete'] as $delete_id) { //这里是循环遍历这个数组 todelete 每一个值被设置成 $delete_id
$query = "DELETE FROM email_list WHERE id = $delete_id";
mysqli_query($dbc, $query)
or die('Error querying database.');
}
echo 'Customer(s) removed.<br />';
}
// Display the customer rows with checkboxes for deleting
$query = "SELECT * FROM email_list";
$result = mysqli_query($dbc, $query);
while ($row = mysqli_fetch_array($result)) {
// todelete[]是一个数组 能够把checkbox中选中的放到这个数组中
echo '<input type="checkbox" value="' . $row['id'] . '" name="todelete[]" />';
echo $row['first_name'];
echo ' ' . $row['last_name'];
echo ' ' . $row['email'];
echo '<br />';
}
php使用check box的更多相关文章
- MFC编程入门之二十二(常用控件:按钮控件Button、Radio Button和Check Box)
本节继续讲解常用控件--按钮控件的使用. 按钮控件简介 按钮控件包括命令按钮(Button).单选按钮(Radio Button)和复选框(Check Box)等.命令按钮就是我们前面多次提到的侠义的 ...
- Know How To Use Check Box Mapping Of Other Values Property In Oracle Forms
Check Box Mapping of Other Values specifies how any fetched or assigned value that is not one of the ...
- Check Box Select/Deselect All on Grid
The below function is to be used on a grid with multiple check boxes. Place the code behind a FieldC ...
- Check Box、Radio Button、Combo Box控件使用
Check Box.Radio Button.Combo Box控件使用 使用控件的方法 1.拖动控件到对话框 2. 定义控件对应的变量(值变量或者控件变量) 3.响应控件各种消息 Check Box ...
- How to get the value of a form element : check box and radio button
Getting a radio element and it’s checked value Radio buttons in a form can be grouped together using ...
- VS2010/MFC编程入门之二十二(常用控件:按钮控件Button、Radio Button和Check Box)
言归正传,鸡啄米上一节中讲了编辑框的用法,本节继续讲解常用控件--按钮控件的使用. 按钮控件简介 按钮控件包括命令按钮(Button).单选按钮(Radio Button)和复选框(Check Box ...
- VS2010-MFC(常用控件:按钮控件Button、Radio Button和Check Box)
转自:http://www.jizhuomi.com/software/182.html 按钮控件简介 按钮控件包括命令按钮(Button).单选按钮(Radio Button)和复选框(Check ...
- jquery check box
if ($("#eulaLine").is(':checked')) { var mobile = $("#mobile").val(); if (mobile ...
- Check Box 用法
void CMyDlg::OnInitDialog() //Check1 初始化为选中状态 void CMyDlg::OnInitDialog() { CDialog::OnInitDialog(); ...
随机推荐
- imagemagick 图像处理扩展
做图像处理的一个工具. http://www.imagemagick.org/script/command-line-processing.php 支持命令行模式,支持接口调用.php 等等都可以,看 ...
- Android 显示YUV编码格式
ByteArrayOutputStream out = new ByteArrayOutputStream(); String path = "res/drawable/sample.yuv ...
- Hibernate摘记
原理: 1.通过Configuration().configure();读取并解析hibernate.cfg.xml配置文件2.由hibernate.cfg.xml中的<mapping reso ...
- Oracle EBS-SQL (PO-10):检查过期采购未接收订单.sql
Select pha.segment1 采购订单, MSI.SEGMENT1 物料编码, MSI.DESC ...
- poj 1860 (Bellman_Ford判断正环)
题意:给出n种货币,m中交换关系,给出两种货币汇率和手续费,求能不能通过货币间的兑换使财富增加. 用Bellman_Ford 求出是否有正环,如果有的话就可以无限水松弛,财富可以无限增加. #incl ...
- CxImage的使用
1.首先从此处下载源代码 http://www.codeproject.com/KB/graphics/cximage.aspx 2.然后将里面的工程全部编译一下,我觉得应该是生成对应的库. 3.然后 ...
- OpenStreetMap(OSM) JMap Viewer(Java swing map)
This article from:http://wiki.openstreetmap.org/wiki/JMapViewer JMapViewer is a java component which ...
- linear encoder 和 PCA
- ubuntu下tcpdump使用
Ubuntu默认是安装好了tcpdump工具的,如果没有安装的话使用sudo apt-get install tcpdump即可安装. (如果遇到tcpdump: no suitable devi ...
- android 常用调用系统功能
1.从google搜索内容 Intent intent = new Intent(); intent.setAction(Intent.ACTION_WEB_SEARCH); intent.putEx ...