473,791 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Select Checkbox group based of database value

8 New Member
I want to select CheckBox based on data retrieved from mysql database table.

Could anyone show me the simple way of doing it.

Data store in table under colum "sectionOfInter est" is shown below
------------------------------------------------------------------------
"Commercial Security Middle East, Homeland Security and Policing Middle East,Safety & Health Middle East, "
-----------------------------------------------------------------------------------



[HTML]

<table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="86%">


<tr>
<td height="20" colspan="3">Ple ase indicate which section of
exhibition you are most interested in?</td>
</tr>


<tr>
<td width="94" height="20">&nb sp;</td>
<td height="20">
<input type="checkbox" name="chkSectio nInterested[]" value="Commerci al Security Middle East" style="font-family: Arial; font-size: 10pt; border: 0px solid #C0C0C0; padding: 0">Commercia l
Security Middle East</td>
<td width="4" height="20">&nb sp;</td>
</tr>
<tr>
<td width="94" height="20">&nb sp;</td>
<td height="20">
<input type="checkbox" name="chkSectio nInterested[]" value="Fire and Rescue Middle East" style="font-family: Arial; font-size: 10pt; border: 0px solid #C0C0C0; padding: 0">Fire
and Rescue Middle East</td>
<td width="4" height="20">&nb sp;</td>
</tr>
<tr>
<td width="94" height="20">&nb sp;</td>
<td height="20">
<input type="checkbox" name="chkSectio nInterested[]" value="Safety &amp; Health Middle East" style="font-family: Arial; font-size: 10pt; border: 0px solid #C0C0C0; padding: 0">Safety
&amp; Health Middle East</td>
<td width="4" height="20">&nb sp;</td>
</tr>
<tr>
<td width="94" height="10"></td>
<td height="10">
<input type="checkbox" name="chkSectio nInterested[]" value="Homeland Security and Policing Middle East" style="font-family: Arial; font-size: 10pt; border: 0px solid #C0C0C0; padding: 0">Homeland
Security and Policing Middle East</td>
<td width="4" height="10"></td>
</tr>
<tr>
<td width="94" height="10"></td>
<td height="10">
<input type="checkbox" name="chkSectio nInterested[]" value="Conferen ce" style="font-family: Arial; font-size: 10pt; border: 0px solid #C0C0C0; padding: 0">Conferenc e</td>
<td width="4" height="10"></td>
</tr>
</table>

[/HTML]
Nov 21 '07 #1
1 1793
jhardman
3,406 Recognized Expert Specialist
How much ASP do you know? Do you know how to connect to a database?

Jared
Nov 23 '07 #2

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

Similar topics

4
6610
by: Michael Champagne | last post by:
We have an application to where you can select/deselect all checkboxes in a checkbox array by clicking a 'master' checkbox at the top of the screen. This seems to work fine unless there is only one checkbox (these are dynamically generated). Why does this fail? If I do an alert(field_to_check.length) with 1 element in the array like this I get 'Undefined'. Is this because this datatype is not an array if there is only 1 element here? ...
3
2461
by: Adam Toline | last post by:
In reference to the following: http://www.bellecose.com/form.htm At the top of each column there is a box for "All". When one is checked I need to check all of (and only) those boxes underneath. Now, the rub here is that every checkbox on the page (except the "All"s)
2
2338
by: Tomas Vera | last post by:
Hello All, I'm having problems creating a page with dynamic checkboxes in a WebApp. In my app, I need to query a database, then (based on results) add checkboxes to my form and set their "Checked" state. Since the controls are dynamically created, I'm using the OnInit event to create the checkboxes and set the "Checked" state from the DB. Next, I want to capture the postback event (AutoPostBack=true) and update my database based on...
2
12830
by: bigrich | last post by:
I'm a beginner to javascript and need help. I've searched the forum but can't piece the answer together. I need to be able to uncheck and disable a checkbox based on the option selected in a Select list. This is what I tried. Any help is appreciated. ============== <script type="text/javascript"> function GetOptVal(OptVal)
5
2059
by: FP | last post by:
I have a list of results. When the user clicks a checkbox I need it to update the database but I don't want it to reload the current page. Currently I have the following; - a checkbox in a form - the record ID as a hidden value in the form - using onclick to open a new window - form targets new window - new window closes itself Aside from the window flickering by this works well. The problem is
6
4357
by: Daz | last post by:
Hi everyone. Firstly, I apologise if this i not what you would call a PHP problem. I get quite confused as to what lives in which realm, so if this shouldn't be posted here, please suggest where I should post it. I have created a form, which consists of a list of items, each with a checkbox. When a checkbox is checked or unchecked, the page should be refreshed. During the refresh, the data is validated and the MySQL database is...
22
12495
by: MP | last post by:
vb6,ado,mdb,win2k i pass the sql string to the .Execute method on the open connection to Table_Name(const) db table fwiw (the connection opened via class wrapper:) msConnString = "Data Source=" & msDbFilename moConn.Properties("Persist Security Info") = False moConn.ConnectionString = msConnString moConn.CursorLocation = adUseClient moConn.Mode = adModeReadWrite' or using default...same result
0
3042
by: New2ASP | last post by:
Thanks everyone in advance for your help. I am fairly new to web development but an experienced window-based developer. Here's the structure of my Gridview Column 1 : Checkbox with SelectAll Checkbox Header Column 2-9: BoundField Column 10: img field If the user select one checkbox item, it will open up another gridview (multiple selection does nothing). If select a row item, it will open a different aspx page. If select...
4
10585
by: The.Daryl.Lu | last post by:
Hi, Have a bit of a problem... I've created a form in Access and will use the form for a user to query a table based on the selected fields. The problem lies in that I was using checkboxes for the fields and noticed that if I don't check a box, then the query will look specifically in the table for where the applicable field is FALSE. This isn't right however and decided that I should use a radio button group so that the user can select...
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10155
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
9995
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...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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
5431
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
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.