在所有页面上跟踪所选复选框及其值 [英] keeping track of selected check box and its values on all pages

查看:91
本文介绍了在所有页面上跟踪所选复选框及其值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户列表(已为时事通讯签名)。当管理员点击按钮时,我正在从数据库中检索列表。

每页最多显示10个用户例如,如果我在数据库中有30个用户,我将有3页用户(页面1,2,3);

对于每个列出的用户,我在右侧有一个复选框。复选框适用于管理员想要选择发送时事通讯的几个人。

Ex:

页:1 | 2 | 3

1.ana复选框

2.john复选框

3.mike复选框

----------- ----------

10.cindy复选框

然后,如果管理员想要转到另一页:

页:1 | 2 | 3

1.lucy复选框

2.shinoda复选框

----------- --------------

10.michelle复选框

等等

关闭此用户列表,管理员有1个按钮:发送

发送按钮用于他只想将简报发送到选中复选框的人


我的问题是管理员想要从不同页面中选择人员(例如:他从第一页选择2个人,在第二页选择3个人,最后一页上有1个人,然后他点击发送)

因为当他点击另一个页面的按钮时,数据会丢失,因此很难保留选中的总复选框的证据



如果我回到旧页面(第1页或第2页)我必须显示(我的意思是复选框应该选中)复选框已被选中

请帮帮我

I have a list of users(signed for a newsletter).I''m retrieving the list from a database when the admin clicks on a button.
There are maximum 10 users diplayed per page.For example,if I had 30 users in the database,I would have 3 pages of users(Page 1,2,3);
For each listed user ,I have a checkbox on the right side.The checkbox is for when the admin wants to selected a few people to whom send the newsletter.
Ex:
Page: 1|2|3
1.ana checkbox
2.john checkbox
3.mike checkbox
---------------------
10.cindy checkbox
Then,if the admin want to go to another page :
Page : 1|2|3
1.lucy checkbox
2.shinoda checkbox
-------------------------
10.michelle checkbox
and so on
Down this list of users , the admin has 1 button : Send
The Send button is used when he wants to send the newsletter only to the people with the checkbox selected


My problem is when the admin wants to select people from different pages(Ex: he selects 2 people from the first page,3 on the second ,1 person on the last page , and then he clicks send)
Because when he clicks the button for another page,the data is lost,so it''s hard to keep evidence of the total checkboxes selected


if i go back to old pages ( page 1 or 2) i have to show ( i mean check box should be checked) that that the check box has been selected
please help me

推荐答案

Heya,Aniltc。


你想要的将所选值存储在 _SESSION
Heya, Aniltc.

You''ll want to store the selected values in the _SESSION.


您''我想将选定的值存储在 _SESSION 中。[/ quote]


我该怎么办?

是它喜欢

You''ll want to store the selected values in the _SESSION.[/quote]

How can i?
is it like


_SESSION [''chkbox''] =
_SESSION[''chkbox'']=


这篇关于在所有页面上跟踪所选复选框及其值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆