473,802 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
+ 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 6240
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******@hotma il.comwrote in message
news:11******** **************@ 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>
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*******@attgl obal.net
=============== ===
May 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5753
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 align="center"><input class="button" type="button" onClick="location='draftedStory.asp';" value="Click to complete the drafted story"></p> <p align="center"> <input class="button" type="submit" value="Click to view your grade sheet" name="submit"> </p>
1
6323
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 google. The 3rd option I want to search the site using MS-Index Server. I can get them to run individually but I'm not sure how to set the parameters and test for the 3rd radio button (index server) selected on the page. I thought that, for...
15
2560
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 Column B Column C data 4 radio buttons more data .... ... ... .... ... ...
2
12351
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 ... without having to get this value via html, is there any way I can passed the checked value via html .. maybe with syntax like n4.checked.value or something.. Many thanks. <html>
9
2255
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 type="text/javascript"> function setCheckedValue(radioObj, newValue) { if(!radioObj)
10
6106
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 button with this link of code: echo 'SCRIPT language=JavaScript setCheckedValue("'.$_SESSION.'");</SCRIPT>'; //? <snip of code>
5
4157
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 MySQL database using JavaScript to find a product either by Product ID, Description, or Both. Originally, the 'Both' radio button was "checked" but I now want the 'Product ID' button set as the default choice (as you can see from the code below). ...
3
2853
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 Right, when say mp3 radio button is selected, and say BLA is typed in the text box. I would like it to open up...
3
6885
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 our variables $day = $_GET; $date = $_GET; $groupname = $_GET;
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7598
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.