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

read radiobutton value from database

I'm able to the value for 2 of the options in the radio button I have, but
can't seem to get more than 3 options to work. How can I get 3 more options
added to this current coding. The other options are: email and fax and
pager.
<? $check0 = $check1 = "";$check2 = $check3 = ""; $check4="";
if ($prefmethod == "Phone") { $check0 = " CHECKED"; } else { $check1 = "
CHECKED"; }
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Phone"'.$check0.'>Phone';
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Mobile"'.$check1.'>Mobile'; ?>


Jul 16 '05 #1
2 4993
Hello Entoone!

Here is the code for 3 options

<?
$check0="";
$check1="";
$check2="";
if ($ud_prefmethod == "Phone") { $check0 = " CHECKED"; }
if ($ud_prefmethod == "Mobile") { $check1 = " CHECKED"; }
if ($ud_prefmethod == "Fax") { $check2 = " CHECKED"; }

echo "<INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Phone\"
$check0>Phone
<INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Mobile\" $check1>Mobile
<INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Fax\" $check2>Fax";
?>
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy

I'm able to the value for 2 of the options in the radio button I have, but
can't seem to get more than 3 options to work. How can I get 3 more options added to this current coding. The other options are: email and fax and
pager.
<? $check0 = $check1 = "";$check2 = $check3 = ""; $check4="";
if ($prefmethod == "Phone") { $check0 = " CHECKED"; } else { $check1 = "
CHECKED"; }
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Phone"'.$check0.'>Phone';
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Mobile"'.$check1.'>Mobile'; ?>



Jul 16 '05 #2
Thanks for your time and post Olexiy!

I appreciate it.. everythings working now.
"Olexiy Merenkov" <me******@inbox.ru> wrote in message
news:bh***********@pandora.alkar.net...
Hello Entoone!

Here is the code for 3 options

<?
$check0="";
$check1="";
$check2="";
if ($ud_prefmethod == "Phone") { $check0 = " CHECKED"; }
if ($ud_prefmethod == "Mobile") { $check1 = " CHECKED"; }
if ($ud_prefmethod == "Fax") { $check2 = " CHECKED"; }

echo "<INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Phone\"
$check0>Phone
<INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Mobile\" $check1>Mobile <INPUT TYPE=\"RADIO\" NAME=\"ud_prefmethod\" VALUE=\"Fax\" $check2>Fax";
?>
Kindest Regards,
Olexiy Merenkov
http://www.merenkov.com/olexiy

I'm able to the value for 2 of the options in the radio button I have, but can't seem to get more than 3 options to work. How can I get 3 more

options
added to this current coding. The other options are: email and fax and
pager.
<? $check0 = $check1 = "";$check2 = $check3 = ""; $check4="";
if ($prefmethod == "Phone") { $check0 = " CHECKED"; } else { $check1 = "
CHECKED"; }
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Phone"'.$check0.'>Phone';
echo '<INPUT TYPE="RADIO" NAME="ud_prefmethod"
VALUE="Mobile"'.$check1.'>Mobile'; ?>


Jul 16 '05 #3

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

Similar topics

8
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from...
0
by: rodrigo | last post by:
I have a Asp.net table control that I dynamically add rows from a SQL database. Inside the table, I add radiobuttons and they all have different ID numbers according to BindChain() Looking In...
3
by: sofie | last post by:
Hello all, I use the following javascript function in a html document to set the level of one of eight available radiobuttons. The line that's commented out works fine under IE, but I need to...
2
by: JeffFinnan | last post by:
<form name=form1> Load in Viewer Window: <input name="radiobutton" type="radio" value="1" checked onClick="1"> 1&nbsp;&nbsp;&nbsp; <input type="radio" name="radiobutton" value="2" onClick="2">...
1
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column...
3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
4
by: Ankit Aneja | last post by:
code of my aspx page <asp:RadioButtonList id="RadioButtonList1" runat="server"></asp:RadioButtonList> now i want to bind data from database Dim rsComm As SqlCommand Dim rsReader As...
1
by: hellyna | last post by:
How to insert radiobutton value into the mysql? This is addrecordfrom.php <form name="addsummonrecord" method="post" action="addrecordprocess.php" id="signup" onSubmit="return...
1
by: jwright1 | last post by:
I am trying to set the selected value of a radio button list from a value stored in a table of a database. using vb codebehind asp.net. I tried binding the selected index item and selected index...
4
by: Jim in Arizona | last post by:
In html and ASP, I would easily code radio buttons as needed, such as: <input type="radio" name="question1" value="1">1</input>&nbsp; <input type="radio" name="question1"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.