|
| ||||||||||
| Tags: html, information, php, radio button, retrieve |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Retrieve information with radio buttons
On my site, I have a form that has 3 radio buttons (1 for "Request for appointment", 2 for "Request for information", 3 for other purposes). Everything is ok except for radio buttons. My HTML code for the form: HTML Code: <FORM Method= "POST" action= "do_sendform.php" name= "Contact"> <p align= "center"> <font face= "Bell Gothic Std Black"> Reason for contact: </font> </p> <p align= "center"> <input type= "radio" name= "DemandYou" value= "Demand meeting you"> <font face= "Bell Gothic Std Black"> Application for appointment</font> <input type= "radio" name= "Intelligence" value= "Intelligence"> <font face= "Bell Gothic Std Black"> Inquiry </font> <input type= "radio" name= "Other" value= "Other"> <font face= "Bell Gothic Std Black"> Other: </font> <input type= "text" name= "Other"> </p> <p align= "center"> <font face= "Bell Gothic Std Black"> Your First & Last Name: </font> <br> <INPUT Type= "text" name= "sender_name" size= 30> </p> <p align= "center"> <font face= "Bell Gothic Std Black"> Your email address: </font> <br> <INPUT Type= "text" name= "sender_email" size= 30> </p> <p align= "center"> <font face= "Bell Gothic Std Black"> Message: </font> <br> <textarea name= "message" cols= "63" rows= "8"> </textarea> </p> <p align= "center"> <font face= "Bell Gothic Std Black"> <INPUT type= "submit" value= "SEND"> </font> </p> </FORM> PHP Code: |
|
#2
| ||||
| ||||
| Re: Retrieve information with radio buttons
Are the radio buttons of the same "name"? If yes then you can easily retrieve the "value" of the selected radio in $_POST ['name_of_radios'] |
|
#3
| |||
| |||
| Re: Retrieve information with radio buttons
I was just testing what you told me and it works. But I still have some questions: 1. I added a text box for radio buttons. Is this possible, when this button is activated it retrieves the value of the text box? 2. As soon as the form is valid, I come on a white page that returns a message to the user and say that the message was taken. I want to add a button over there namely "Back". Is it possible? How? |
|
#4
| ||||
| ||||
| Re: Retrieve information with radio buttons
1 - Its very simple. If the third option is selected, you use the $_POST ['name_of_field'] to get its value. 2 - I do not understand what you are trying to achieve. |
|
#5
| |||
| |||
| Re: Retrieve information with radio buttons
1. Thanks for the solution 2. Once the user clicked to send the form, with the help of php code, the user gets a message saying the message has been sent. The problem is that the only way to go back is to click on the button "Back" of the browser. I would like to add a button on this page to return for example on the home page? |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Retrieve information with radio buttons" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Android apps that can stream Bloomberg Radio and Hot 97 Radio Stations? | Aalap | Portable Devices | 6 | 01-07-2011 10:21 PM |
| Getting error: Windows could not retrieve information about the disks on this computer | Samaria | Operating Systems | 4 | 16-12-2010 10:26 PM |
| VBSript - Fancy radio buttons | milnet | Software Development | 3 | 13-05-2010 01:56 PM |
| Convert information to radio button | KADEEM | Software Development | 3 | 31-10-2009 02:47 PM |
| How to retrieve information from delphi getappname method | Lord of the RIG | Software Development | 3 | 11-08-2009 02:31 PM |