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

Re: Sending data to database via radio button choice. by Joe

Joe
Sun Jul 06 16:27:32 CDT 2003


"Renie83" <renie83@lycos.com> wrote in message
news:8e153bdf.0307060901.1b6ce1fa@posting.google.com...
> 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.




Re: Sending data to database via radio button choice. by renie83

renie83
Mon Jul 07 19:30:29 CDT 2003

"Joe Z" <noone@nowhere.com> wrote in message news:<eQe4rVARDHA.2768@tk2msftngp13.phx.gbl>...
> "Renie83" <renie83@lycos.com> wrote in message
> news:8e153bdf.0307060901.1b6ce1fa@posting.google.com...
> > 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!

Re: Sending data to database via radio button choice. by mariakovacs

mariakovacs
Thu Sep 11 16:45:20 CDT 2003


Hi,

I am trying to create exactly the same thing as you did. I am trying to
have 2 radiobuttons one with a value "Sales_Tools", the other with no
value at all (blank) or with a value "No_Sales_Tools", and have that be
inserted into the field "Sales_Tools"



I tried different ways to code this but for some reason the radio button
doesn't pass anything into the database. I am a begginer w/ databases
and I have no trouble with text imput but radio button don't seem to
come that easy, and I did not find any info anywhere.



Can you please help me with some code snippet or a link to some info?



Thank you,

Maria


--
Posted via http://dbforums.com

Re: Sending data to database via radio button choice. by John

John
Thu Sep 11 17:50:14 CDT 2003

On Thu, 11 Sep 2003 17:45:20 -0400, mariakovacs
<member37758@dbforums.com> wrote:

Have you tried coding the field Sales_tools to pass the radio button
value to the database on exit or on Update?


>
>Hi,
>
> I am trying to create exactly the same thing as you did. I am trying to
> have 2 radiobuttons one with a value "Sales_Tools", the other with no
> value at all (blank) or with a value "No_Sales_Tools", and have that be
> inserted into the field "Sales_Tools"
>
>
>
>I tried different ways to code this but for some reason the radio button
>doesn't pass anything into the database. I am a begginer w/ databases
>and I have no trouble with text imput but radio button don't seem to
>come that easy, and I did not find any info anywhere.
>
>
>
>Can you please help me with some code snippet or a link to some info?
>
>
>
>Thank you,
>
>Maria