radio buttons

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

    radio buttons

    How can I interface radio buttons with PHP?

    I would like to select one of several choices and use the variable in PHP.
    Only one choice per group is allowed.

    <form name="state" method="post" action="next_fi le.php">
    <table border="0" cellspacing="0" cellpadding="0" width=450
    align=center><t r><td>

    <input TYPE="radio" NAME="select_st ate"
    value="illinois "></td><td>Illinois </td></tr>

    <tr><td><inpu t TYPE="radio" NAME="select_st ate" value="Michigan "
    CHECKED></td><td>Michigan </td></table>

    <input type=button value='Continue ' onClick='javasc ript:sign_in()> </td></tr>

    <?PHP
    $_SESSION{'stat e'] = $select_state; does not work.

    ?>

    Thanks for the help.

    Ken


  • Michael Fesser

    #2
    Re: radio buttons

    .oO(Ken)
    [color=blue]
    ><?PHP
    >$_SESSION{'sta te'] = $select_state; does not work.[/color]

    Use $_POST['select_state'] instead of $select_state.

    Micha

    Comment

    • kingofkolt

      #3
      Re: radio buttons

      "Michael Fesser" <netizen@gmx.ne t> wrote in message
      news:cfb3i057ig hsjj801aa8it8mo 6ibigufpi@4ax.c om...[color=blue]
      > .oO(Ken)
      >[color=green]
      > ><?PHP
      > >$_SESSION{'sta te'] = $select_state; does not work.[/color]
      >
      > Use $_POST['select_state'] instead of $select_state.
      >
      > Micha[/color]

      Also, $_SESSION{'stat e'] should be $_SESSION['state'].

      - JP


      Comment

      • Ken

        #4
        Re: radio buttons

        Thanks.

        I tried that before I wrote to the board, it did not work.

        Now it does. Must of had a error in the script.

        Feeling small right now!!

        Ken


        "Michael Fesser" <netizen@gmx.ne t> wrote in message
        news:cfb3i057ig hsjj801aa8it8mo 6ibigufpi@4ax.c om...[color=blue]
        > .oO(Ken)
        >[color=green]
        > ><?PHP
        > >$_SESSION{'sta te'] = $select_state; does not work.[/color]
        >
        > Use $_POST['select_state'] instead of $select_state.
        >
        > Micha[/color]


        Comment

        • Michael Fesser

          #5
          Re: radio buttons

          .oO(Ken)
          [color=blue]
          >Feeling small right now!![/color]

          strtoupper('ken ');

          ;)
          Micha

          Comment

          Working...