473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

checking the status of checkboxes

I have an PHP page that contains several checkboxes. I need to know if the
user has check all of the checkboxes before they can proceed to the next
page.
How do I check there status?
And can I put a conditon on a Submit button so that when they press Submit
it will only open the next page if all boxes are checked??

TIA
Kate
Jul 17 '05 #1
1 1879

"Kate" <an**@anon.net> wrote in message
news:B7*******************@wards.force9.net...
I have an PHP page that contains several checkboxes. I need to know if the
user has check all of the checkboxes before they can proceed to the next
page.
How do I check there status?
And can I put a conditon on a Submit button so that when they press Submit
it will only open the next page if all boxes are checked??

OK, sort of talking about 2 different things.

1) verify selection before going to next page.

Since you placed this on the PHP news, I can only assume you are thinking of
this via PHP.

So, yes, you can check the values of checkboxes from PHP, but only after the
form is submitted.

google $_POST and $_GET to see how
2) only submit if all checked

that is a client side operation, and PHP has no control over that.

for this you need client-side Javascript.

and the easiest way to do that is to go get a nice form validation class
from...

http://groups.yahoo.com/group/javascript_validation

all you need to do is add a few custom attributes to the checkbox tags,
include the JS class file and your ready to go.

Hope this helps in some way.

Walter
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: arenaTR | last post by:
I have a group of five checkboxes that I need to check in a script after a post-operaiton. I was using the code: $drv1 = $_POST but if the user left checkbox "driving_1" empty, i get a php...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
2
by: Maziar Aflatoun | last post by:
Hi everyone, I am reading and displaying data rows from my database where the first column contains the Status checkbox. I like to enable my users to change the status of individual rows by...
4
by: david | last post by:
I have an array of CheckBoxes which dynamically display in a web form. How to detect and determine which CheckBox' check status changed? For example, Array(i, j) from checked to Unchecked and...
1
by: Ramakrishnan Nagarajan | last post by:
Hi, I have two checkboxes in each row of a grid. One for Modify and another one for View. If I click Modify the View should get automatically checked and should be disabled. Earlier I did this in...
0
by: Bob Keller | last post by:
I've been working on a web project (VB) previously done with DataGrids in VS2003. I've migrated the project over to VS2005, because I like what I've seen of the newer features. Soooo.. I've...
8
by: linuxnooby | last post by:
Hi This is not worlking for me, I want all the checkboxes to be checked by default, what is wrong? <body onload="document.getElementsByTagName('input').checked=true"> cheers Dave
5
by: bjwest | last post by:
I'm writing a windows mobile app that uses dynamiclly created checkboxes. I'm having trouble getting the checked status. public void Add_CheckBox(String CBText) { ...
3
by: sakkat | last post by:
Hi, I should have a table with 2 columns in it, the first column will contain 10 checkboxes(the number is not fixed it changes dynamically) and a button(move) and the second column will be empty,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.