About calling radiobutton value from HTML to PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Akirien
Forum Newbie
Posts: 7
Joined: Mon Mar 09, 2009 7:34 am

About calling radiobutton value from HTML to PHP

Post by Akirien »

How to call radiobutton value from HTML to PHP?
For example..

Customer need to choose either BASIC MEMBER or PRIVILEGED MEMBER in HTML form.
If they checked BASIC MEMBER, I want to count the price within its condition (in PHP)

Radiobutton in HTML :

<INPUT TYPE = "radio" NAME = "member" VALUE = "Basic">Basic Member


Please Help Me :cry:
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: About calling radiobutton value from HTML to PHP

Post by susrisha »

in the action page(php), you will be able to access the value of the radio button

Code: Select all

 
$radio_value= $_REQUEST['member'];//REQUEST can be changed to post or get depending on the method
 
In your case if the user selected that value, $radio_value will be "Basic"
Post Reply