Jump to content


This topic is now archived and is closed to further replies.


an interesting php problem regarding checkboxes

Recommended Posts

hello friends this is arun here

                            friends i m working on a project in php and facing some problem but i hope i got a solution here.

my problem : i have a invitees_present form which is connected to a database in mysql.
now when i run my page it retrives some names from the database and corresponding chack box.
now i have to check some selected check boxes and then store the values in database table. but on the onclick of check boxes at client side how i can save these values in database.one more thing to remember is that the number of checkboxes i got are dynamic in nature how i can named all these. is there any concept of array in html or otherthings i have to do .

                    help me ,your suggession can build a good project by me
                      thanks in advanced


Share this post

Link to post
Share on other sites
Do update the database from the client side you will need to use ajax. Its fairly easy.

you can indeed create arrays of elements in html : use name="chkbx[1]" , chkbx[2] etc.

Or just chkbx[] if you want these fields to auto generate their indices.

Share this post

Link to post
Share on other sites
chkbox[] also works in php.
it will make the results an array for you to play with

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.