473,385 Members | 1,766 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,385 software developers and data experts.

Adding values to a database depending on checkbox state

hello ,

here , i have arised problem in php & mysql .

i have one form which has 3 checkboxes .if i m selected checkbox then the radiogroup is enable and i m selected one value.

if i m selecting multiple checkbox is selected then that all checkbox values are inserted into the mysql database .

means suppose
1chekcbox- radiogrop value is 1,2,3 check & select 2
2chekcbox- radiogrop value is 1,2,3 check & select 3
3chekcbox- radiogrop value is 1,2,3 not check

then suppose
table is select * from table1;
insert into table1(checkbox1,radio) values(checkvalues,radiovalues);
want to insert

so at a time both selected checkbox & that values r inserted into the database at a time

if u can solve than pls reply............
thank u
Sep 20 '07 #1
4 2724
code green
1,726 Expert 1GB
Your idea sounds fine and the plan is simple.
But I am sorry because I do not understand exactly what your problem is
Sep 20 '07 #2
Your idea sounds fine and the plan is simple.
But I am sorry because I do not understand exactly what your problem is

hello
thank you for reply me .

but i m tell u again
i have 3 checkboxes right .& 3 radiobuttongroups.
my code is like: if i m select checkbox then radiogroup is enable .if not click then radiogroup is disable .1 checkbox has 1 radiogroup.

so upto this i have complete but problem is here,
suppose i have select 2 checkbox & 2 radio ok then i want to insert 2 checkbox values & 2 respected radiogroup values inserted into the mysql table at a time (means submit).

ok
i think u get idea.

reply me
thank you
khyati
bye
Sep 20 '07 #3
code green
1,726 Expert 1GB
suppose i have select 2 checkbox & 2 radio ok then i want to insert 2 checkbox values & 2 respected radiogroup values inserted into the mysql table at a time (means submit).
Do you mean you want to INSERT multiple records? Like this
Expand|Select|Wrap|Line Numbers
  1. INSERT INTO table1(checkbox,radio) VALUES (checkvalues1,radiovalues1),(checkvalues2,radiovalues2),(checkvalues3,radiovalues3),etc
In other words you name the fields, then for each record you list each set of values within brackets, seperated by a comma.
Sep 20 '07 #4
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Sep 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
3
by: Punisher | last post by:
I'm adding checkbox controls to a table dynamically when the form loads for the first time. When a postback occurs, the controls are not maintained in the table. How do I get them to retain...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
8
by: Alan Silver | last post by:
Hello, I have a repeater that has code like this... <ItemTemplate> <asp:CheckBox ID="chkDelete" Text="" RunAt="server"/> .... other stuff goes here </ItemTemplate> There is a button below...
9
by: =?Utf-8?B?UGV0ZXJX?= | last post by:
I have a TabControl on a Windows form in which I have various tab pages each with a DataGridView, the first column of which is a DataGridViewCheckBoxColumn and subsequent columns being...
10
by: LionsDome | last post by:
Hello, I have a vb.net page which a bunch of checkboxes. A user can select a checkbox(s) and hit the submit button to store those values in a SQL Server table. This works fine with no problem...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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,...

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.