read radiobutton value from database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • entoone

    #1

    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_prefme thod"
    VALUE="Phone"'. $check0.'>Phone ';
    echo '<INPUT TYPE="RADIO" NAME="ud_prefme thod"
    VALUE="Mobile"' .$check1.'>Mobi le'; ?>




  • Olexiy Merenkov

    #2
    Re: read radiobutton value from database

    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_prefm ethod\" VALUE=\"Phone\"
    $check0>Phone
    <INPUT TYPE=\"RADIO\" NAME=\"ud_prefm ethod\" VALUE=\"Mobile\ " $check1>Mobile
    <INPUT TYPE=\"RADIO\" NAME=\"ud_prefm ethod\" VALUE=\"Fax\" $check2>Fax";
    ?>


    Kindest Regards,
    Olexiy Merenkov


    [color=blue]
    > 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[/color]
    options[color=blue]
    > 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_prefme thod"
    > VALUE="Phone"'. $check0.'>Phone ';
    > echo '<INPUT TYPE="RADIO" NAME="ud_prefme thod"
    > VALUE="Mobile"' .$check1.'>Mobi le'; ?>
    >
    >
    >
    >[/color]




    Comment

    • entoone

      #3
      Re: read radiobutton value from database

      Thanks for your time and post Olexiy!

      I appreciate it.. everythings working now.


      "Olexiy Merenkov" <merenkov@inbox .ru> wrote in message
      news:bh4m5c$1rp 5$1@pandora.alk ar.net...[color=blue]
      > 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_prefm ethod\" VALUE=\"Phone\"
      > $check0>Phone
      > <INPUT TYPE=\"RADIO\" NAME=\"ud_prefm ethod\" VALUE=\"Mobile\ "[/color]
      $check1>Mobile[color=blue]
      > <INPUT TYPE=\"RADIO\" NAME=\"ud_prefm ethod\" VALUE=\"Fax\" $check2>Fax";
      > ?>
      >
      >
      > Kindest Regards,
      > Olexiy Merenkov
      > http://www.merenkov.com/olexiy
      >
      >[color=green]
      > > I'm able to the value for 2 of the options in the radio button I have,[/color][/color]
      but[color=blue][color=green]
      > > can't seem to get more than 3 options to work. How can I get 3 more[/color]
      > options[color=green]
      > > 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_prefme thod"
      > > VALUE="Phone"'. $check0.'>Phone ';
      > > echo '<INPUT TYPE="RADIO" NAME="ud_prefme thod"
      > > VALUE="Mobile"' .$check1.'>Mobi le'; ?>
      > >
      > >
      > >
      > >[/color]
      >
      >
      >
      >[/color]


      Comment

      Working...