473,480 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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>

May 24 '07 #1
2 6214
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5740
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p...
1
6289
by: Brian | last post by:
Hello all... I have a page that will be performing a search. The search consists of 3 radio button options. The first 2 will search the entire web through google and the site as indexed by...
15
2521
by: JR | last post by:
Hi. I hope someone out there who is more versed with JavaScript than I can help me with the following annoying problem. Here's the problem. I have a form with the following layout: Column A...
2
12323
by: jason | last post by:
The following (likely far from imperfect code), reports a value of NaN in the j4 display. I suppose the problem is I am not really passing the "checked" value of the radio button via .value ......
9
2214
by: IchBin | last post by:
I can not see what the problem is with this script. I am just trying to set a radio button by calling setCheckedValue('abbr_letter', 'V'). Sorry I am new to javascript. <html> <head> <script...
10
6044
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
5
4130
by: Fran Jakers | last post by:
Hello all, I'm new to all this and I could really use some help. I've searched the web but cannot find an answer. I have an HTML form with 3 radio buttons and a search field that calls a...
3
2832
by: jahphill | last post by:
Hey. I thought id make a seperate discusion because the other became a bit lengthy and confusing. Aim: Create a php file which works with the script below, which makes the radiobuttons work =D...
3
6861
by: ToddFur | last post by:
I see several postings on this but I am still unable to figure out my problem. I can pass the values of my text field but not radio button (or even checkboxes). My PHP file <?php //declare...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7059
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3011
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.