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

passing radio button values to a submit button (gif)

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

May 24 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <in******@hotmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.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>
May 25 '07 #2

P: n/a
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.
js*******@attglobal.net
==================
May 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.