passing radio button values to a submit button (gif)

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

    passing radio button values to a submit button (gif)

    Hello,

    How do i pass the value of the radio button to be put of the action
    that includes the value as part of the URL being submitted - "/
    picked.php?pick _num=". Any help with be appreciated. Thanks



    <form method="post" action="/picked.php?pick _num=".<php? $value ?
    <input type="hidden" name="cmd" value="0">


    <table width="100%">
    <td align="center">
    <INPUT TYPE='RADIO' NAME='pick_1' VALUE='1'>Day;
    <INPUT TYPE='RADIO' NAME='pick_2' VALUE='2'>Week;
    </td>
    </tr>
    <tr>
    <td align="center"> <input type="img src="/images/pick_now.gif"
    BORDER="0" name="send"></td>
    </tr>
    </table>

  • Graham Weldon

    #2
    Re: passing radio button values to a submit button (gif)

    Name your Radio options in the same set, with the same name:


    <input type="radio" name="timespan" value="1"/Day<br/>
    <input type="radio" name="timespan" value="2"/Week<br/>
    <input type="radio" name="timespan" value="3"/Month<br/>


    This ensures that only one option can be selected, and on the action page,
    you can reference: $_REQUEST['timespan'] for the value.

    Cheers,
    Graham



    "thanos" <inlove22@hotma il.comwrote in message
    news:1180045747 .014489.107060@ p77g2000hsh.goo glegroups.com.. .
    Hello,
    >
    How do i pass the value of the radio button to be put of the action
    that includes the value as part of the URL being submitted - "/
    picked.php?pick _num=". Any help with be appreciated. Thanks
    >
    >
    >
    <form method="post" action="/picked.php?pick _num=".<php? $value ?
    <input type="hidden" name="cmd" value="0">
    >
    >
    <table width="100%">
    <td align="center">
    <INPUT TYPE='RADIO' NAME='pick_1' VALUE='1'>Day;
    <INPUT TYPE='RADIO' NAME='pick_2' VALUE='2'>Week;
    </td>
    </tr>
    <tr>
    <td align="center"> <input type="img src="/images/pick_now.gif"
    BORDER="0" name="send"></td>
    </tr>
    </table>
    >

    Comment

    • Jerry Stuckle

      #3
      Re: passing radio button values to a submit button (gif)

      thanos wrote:
      Hello,
      >
      How do i pass the value of the radio button to be put of the action
      that includes the value as part of the URL being submitted - "/
      picked.php?pick _num=". Any help with be appreciated. Thanks
      >
      >
      >
      <form method="post" action="/picked.php?pick _num=".<php? $value ?
      <input type="hidden" name="cmd" value="0">
      >
      >
      <table width="100%">
      <td align="center">
      <INPUT TYPE='RADIO' NAME='pick_1' VALUE='1'>Day;
      <INPUT TYPE='RADIO' NAME='pick_2' VALUE='2'>Week;
      </td>
      </tr>
      <tr>
      <td align="center"> <input type="img src="/images/pick_now.gif"
      BORDER="0" name="send"></td>
      </tr>
      </table>
      >
      This isn't a PHP question. You should be asking in a newsgroup such as
      alt.html.

      But to post it in the url, you need <... method="get"... >

      If this isn't what you're looking for, I'd recommend asking in alt.html.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      Working...