473,386 Members | 1,758 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.

PLEASE HELP - How to find number of check boxes created dynamically

Could some PHP guru please help me? I have very standard PHP - MySQL
application that reads in some data from a table and for each row, puts
a check box at the start of the row. Now the check boxes are variable
in number, depending only on the number of current records in the
database table. My question is: how do I count the number of check
boxes rendered at any one time. I tried having a global variable and
incrementing it each time a row is rendered on screen, but it does not
work. Any help would be greatly appreciated.

Aug 28 '06 #1
2 1723
Hi
you can create a array of check boxes by adding [] after the
name in
e. g. name="somename[]"
and create as many you want with same name and whenever you submit the
form you will get the check box values in array and just treat the
individual element of array as a seperete check box
e. g. somename[0], somename[1], etc

mail me if you have any problem
Ninad

cp**********@yahoo.com wrote:
Could some PHP guru please help me? I have very standard PHP - MySQL
application that reads in some data from a table and for each row, puts
a check box at the start of the row. Now the check boxes are variable
in number, depending only on the number of current records in the
database table. My question is: how do I count the number of check
boxes rendered at any one time. I tried having a global variable and
incrementing it each time a row is rendered on screen, but it does not
work. Any help would be greatly appreciated.
Aug 28 '06 #2
cp**********@yahoo.com wrote:
Could some PHP guru please help me? I have very standard PHP - MySQL
application that reads in some data from a table and for each row, puts
a check box at the start of the row. Now the check boxes are variable
in number, depending only on the number of current records in the
database table. My question is: how do I count the number of check
boxes rendered at any one time. I tried having a global variable and
incrementing it each time a row is rendered on screen, but it does not
work. Any help would be greatly appreciated.
A variable should work quite fine, whether a global or not. But it's
hard to see what your problem is without some code.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Aug 28 '06 #3

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

Similar topics

1
by: James | last post by:
I am creating a system whereby equipment is inspected. Data is inputted into an inspection form. However, any equipment that is not satisfactory needs to have spare parts ordered for that piece of...
1
by: Pax S | last post by:
I need a button that will check (make true) two check boxes (fields) For the record that has the focus (the record on the form that I am presently looking at). The two check boxes would be like a...
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
2
by: Michael | last post by:
Need some help trying to read values from web controls - specifically *finding* the controls (like a drop down list) - that are added dynamically added within an asp:panel control. The page...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
2
by: muthu | last post by:
Hi freinds, In my aspx page i have generated some check boxes dynamically using dhtml. When i check any check box and submit the form,how can i capture the value of check box. How should i...
1
by: vega80 | last post by:
Hi. I have a problem with assigning an onkeypress-function to dynamically created input-boxes.I want to put the content of an input-field into a tag-list when the user hits enter. This works...
4
by: vinylason | last post by:
I have created some check boxes dynamically but i cant get the checked status of those checkboxes in another event, how can i get it ?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.