By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

read radiobutton value from database

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.