473,503 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending data to database via radio button choice.

Hi all! I was wondering does anyone have any ideas on how I can send
info to a SQL database by choosing a radio button. What I want to do
is set one radio button to "Max" and one to type "Avg". When a user
clicks on a radio button I want the value of whatever button was
chosen to be placed inside the "type" field in my database after they
hit submit. Also, if anyone knows of the best sites or books I can use
about VBScript or ASP please let me know. I'm learning them both right
now. Thank you very much!
Renie83
Jul 19 '05 #1
2 7529

"Renie83" <re*****@lycos.com> wrote in message
news:8e**************************@posting.google.c om...
Hi all! I was wondering does anyone have any ideas on how I can send
info to a SQL database by choosing a radio button. What I want to do
is set one radio button to "Max" and one to type "Avg". When a user
clicks on a radio button I want the value of whatever button was
chosen to be placed inside the "type" field in my database after they
hit submit. Also, if anyone knows of the best sites or books I can use
about VBScript or ASP please let me know. I'm learning them both right
now. Thank you very much!
Renie83

Set the action of the form to the name of an asp page to process the form's
contents.

On that page, if the type radio button set has one button with value "Max"
and another with value "Avg" then the form element "type" will contain
either "Max" or "Avg" depending on which has been clicked by the user.

So on the asp page called by the form's action command you would use
request.form("type") to retrieve the value of the radio button set, which in
your example will be either "Max" or "Avg"

Then you would use ADO to update the database appropriately.

Jul 19 '05 #2
"Joe Z" <no***@nowhere.com> wrote in message news:<eQ**************@tk2msftngp13.phx.gbl>...
"Renie83" <re*****@lycos.com> wrote in message
news:8e**************************@posting.google.c om...
Hi all! I was wondering does anyone have any ideas on how I can send
info to a SQL database by choosing a radio button. What I want to do
is set one radio button to "Max" and one to type "Avg". When a user
clicks on a radio button I want the value of whatever button was
chosen to be placed inside the "type" field in my database after they
hit submit. Also, if anyone knows of the best sites or books I can use
about VBScript or ASP please let me know. I'm learning them both right
now. Thank you very much!
Renie83

Set the action of the form to the name of an asp page to process the form's
contents.

On that page, if the type radio button set has one button with value "Max"
and another with value "Avg" then the form element "type" will contain
either "Max" or "Avg" depending on which has been clicked by the user.

So on the asp page called by the form's action command you would use
request.form("type") to retrieve the value of the radio button set, which in
your example will be either "Max" or "Avg"

Then you would use ADO to update the database appropriately.


Thank you so much! That seems so obvious that I almost kicked myself.
I really appreciate your help!
Jul 19 '05 #3

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

Similar topics

1
1574
by: Matt | last post by:
The following code is try to validate if the user selects a radio button choice. I dont understand why document.UserInputs.question.value; gets undefined value even user make a choice. I tried...
2
18488
by: Matt | last post by:
I have radio buttons on a form, and when the user makes the selection, it will trigger the event and send the form to the web server and print the selected value. In Case 1, I just use submit...
2
2878
by: Stoic | last post by:
I'm offering a selection of three items. One is $25, the second is $50, the third is $100. Along with selection one of the items I need to pass the quantity of the selection. Here is the code now....
3
3093
by: John Davis | last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button,...
0
1795
by: vinay | last post by:
why are u not using the radiobutton list??? vinay >-----Original Message----- >I created a simple ASP.NET application with a text field, and 2 radio >buttons (uppercase and lowercase...
3
2298
by: Chris Marsh | last post by:
Hello, Is it possible w/ASP.Net to set the property of the radio button control to 'read-only' after the user has made their selection before hitting an 'submit' button? Think of a multiple...
5
7507
by: g | last post by:
Hi Guys.. i know this might sound really really simple, but I'm kinda stuck..I have this form..which has a table (created from stored procedure values)..once the table is populated..i have some...
9
9857
by: ameshkin | last post by:
Hi guys, I'm a pretty good PHP programmer, but when it comes to JS, I just dont understand it! But I really need to learn. I'm having trouble doing the simplest thing! When someone clicks...
3
2444
by: Fred Blair | last post by:
I am trying to use Radio Buttons to record a student's choice on a multiple choice test. I am using the MouseClick event to then put the choice into a textbox. This is just to learn about radio...
0
7199
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
7076
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...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
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...
0
4670
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...
0
3162
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...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
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 ...
1
732
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.