473,657 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1733
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**********@ya hoo.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**********@ya hoo.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*******@attgl obal.net
=============== ===
Aug 28 '06 #3

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

Similar topics

1
2296
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 equipment from a list of parts. I kind of need a form which lists parts and then check boxes next to a part can be created so the user can select which parts are needed and then a button is clicked which sends these parts to a report. I am not...
1
1715
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 "sold" check box and an "add to report" check box (for print out). Also as part of this button, I would like for it to enter a date into a field such as a "date sold" field. That should be fairly simple and I could probably figure out how to do...
2
2055
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 (non-.Net) if I wanted to fill a list it may look something like this: -------START CODE <%
2
12354
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 contains multiple panels within the form. The panels appear at different times - for our argument, let's say panel 1 appears first, users clicks a submit button and then panel 1 disappears and panel 2 appears, etc. When clicks on the submit button...
27
4607
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 = $doc->loadHTMLFile("./aBasicSearchResult.html"); if ( $res == true ) { $zip = $doc->getElementById('zipRaw_id')->value; if ( 0 != $zip ) {
1
9623
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 and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
2
1908
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 identify wich check box is been checked.And the check boxes are not server controls.They are the ordinary html check boxes.Can any one help me out
1
7488
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 fine the first time (when the input-field is created in a non-dynamical way). The next input-field is created dynamically by a function that is called when the user hits enter (the previously generated input-field will be hidden). Then I'm trying...
4
1615
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
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8726
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.