CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 how to insert multiple checkbox values into single column database

Print topic Send  topic

Author Message
muthumari

Posts: 2
Posted: 03/29/2006, 7:22 AM

Hi,

how to insert multiple checkbox values(from jsp) into single column of the table(sqlserver database).

Can anyone help me?
Urgently need this one.

Thanx
View profile  Send private message
taslim waris
Posted: 05/19/2006, 10:12 PM

sir i make a order form where i pick the value of medicinename from database and quantity field is a textbox where client fill up the quantity
and and next column is checkbox after selcting all the entries go to database and display on the next page.
and above this orderform a table is where cilent information is filling
i wnat this information with selected order display on next page.
what query i will use.
plz sir solve it
MWarloc
Posted: 05/22/2006, 1:27 AM

Quote muthumari:
how to insert multiple checkbox values(from jsp) into single column of the table(sqlserver database).
I can propose you tu use javaScript for concatinating checkboxes valuse to on string and then insert in to BD.

P.S. Sorry My english.
MWarloc
Posted: 05/22/2006, 1:42 AM

Quote taslim waris:
sir i make a order form where i pick the value of medicinename from database and quantity field is a textbox where client fill up the quantity
and and next column is checkbox after selcting all the entries go to database and display on the next page.
and above this orderform a table is where cilent information is filling
i wnat this information with selected order display on next page.
what query i will use.
plz sir solve it

You can create custom SQL and generate where condition in youyr custom code. Your custom where condition you can put to command in beforeSelect event.
For creating list of interestiong to you rows yo can use javaScript too.

Sorry my english.
pankaj
Posted: 05/27/2006, 4:21 PM

how to insert multiple checkbox values(from php) into single column of the table(mysql database).
MWarloc
Posted: 05/29/2006, 3:08 AM

As CCS java developer i can propse same as to muthumari.
Or go to PHP forum and as PHP developers.
chirag
Posted: 06/12/2006, 11:06 PM

How to insert multiple checkbox value into database?

without using concat
MWarloc
Posted: 06/13/2006, 4:48 AM

You can't inster more then one value to one column in DB.
If want use more then one column, you can create control for every column.
It may be hidden. An set it's value in browser or in action on the server side.
Mahak Bhalla
Posted: 06/30/2006, 10:17 PM

create a form having checkboxes
<PRE lang=HTML><form name="form1" action="chkBoxes.asp" method="post">
<table>
<tr>
<td>Checkbox1:</td>
<td><input type="checkbox" name="chkBox" value="1"></td>
</tr>

<tr>
<td>Checkbox2:</td>
<td><input type="checkbox" name="chkBox" value="2"></td>
</tr>

<tr>
<td>Checkbox3:</td>
<td><input type="checkbox" name="chkBox" value="3"></td>
</tr>

<tr>
<td>Checkbox4:</td>
<td><input type="checkbox" name="chkBox" value="4"></td>
</tr>

<tr>
<td>Checkbox5:</td>
<td><input type="checkbox" name="chkBox" value="5"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="go"></td>
</tr>
</table>
<input type="hidden" name="allBoxes" value="1,2,3,4,5">
</form></PRE>

ur .asp page

<PRE lang=vbscript>'get the array with all of the checkbox id's
arrAll = split(Request.Form ("allBoxes"), ",")

'get the array with the id's that were ticked
arrVals = split(Request.Form ("chkBox"), ",")</PRE>

strSql = ""
strSql = strSql & "UPDATE aTable SET active = 1 WHERE "

for i = 0 to ubound(arrVals)
if i = 0 then
strSql = strSql & "id = "& arrVals(i)
else
'only add the " AND " if this is not the first value
strSql = strSql & " AND id = "& arrVals(i)
end if
next

Response.Write strSql & "<hr>"
MWarloc
Posted: 07/03/2006, 1:35 AM

First of all it's HARD CODE.
Second it's ASP code (This is java forum).
Third in this case esyer to use dLookUp action. (And do not hardcode).
Fourth it's neet's to concat values in JS too.

P.S. Sorry my english.
ssss
Posted: 07/14/2006, 1:47 AM

hoho :-@

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.