T4VN is an online PHP Help community that provides PHP Tutorials, PHP Examples, PHP Scripts, PHP Support
    HOME  |  HOSTING COUPON  |  TEMPLATE  |  PHP SCRIPTS  |  LINK TO US  |  LINK  |  REGISTER | CONTACT
::: Member Login :::
 Username
 Password
 
Forgot your password ?
::: PHP Tutotal :::
  PHP Basic (7)
  PHP Advanced (4)
  PHP Database (2)
  Coding Step By Step (8)
  PHP and AJAX (0)
::: PHP Example :::
  Arrays (1)
  Code Highlighters (3)
  Database Functions (12)
  Date & Time (5)
  E-Mail (6)
  Forms (5)
  Guestbooks (1)
  Logging (2)
  Miscellaneous (10)
  Password Generators (3)
  Randomizers (3)
  String Manipulation (10)
  User Authentication (6)
::: Search On T4VN :::
::: T4VN Statistics :::
  PHP Scripts : 64
  PHP Example : 67
  PHP Tutorials : 21
  PHP News : 93
  Total Coupon : 36
  Other Tutorials :
  Member : 215
  Visitor Online : 4
  Today Visit: 300
  Total Visitor : 301322
  Most Online : 41
::: Sponsored Links :::

PR 4 For This Webpage

Vinaora Logo
Home Today :

Radio Buttons

Author : Rakesh Vashisht

Handling of Radio Buttons in php

PHP Example :

<?php

/*
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This Code will explain the handling of Radio buttons in Php
Author : Rakesh Vashisht
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

We can handle Radio buttons in Php Either bY using  if statement or by using switch ststement.
switch is more useful than using if else.

to complie this statement u should first create a HTML file.
-> then create three radio button :- teacher , doctor,  engineer
 then use this file as code for these radio buttons
*/
 
switch($_POST["radiobutton"])        //we set the switch on the type radio which we create in the html file
{
case 
"teacher":
$val="teacher";                    // if we pick the 'teacher' then the value will be get this parameter
break;

case 
"doctor":
$val="doctor";                    // if we pick the 'doctor' then the value will be get this parameter
break;

case 
"engineer":
$val="engineer"
                   
// if we pick the 'engineer' then the value will be get this parameter
default:
$val="teacher";
}
echo 
"the option u have pick is   ".$val;
?>


Other Example
Select Menu out of MySql


::: Resources :::
  Links Directory
  Programming 2 3
  Webmaster 2 3
  Web Design 2 3
  Web Hosting 2 3
  Other Links 2 3
  Asian ShowBiz News
  Teach Seo For You
::: New Templates :::




::: Other Tutorials :::
 Program Design

  Powered By T4VN.NET - Version 2.0 - CopyRight © T4VN.NET 2005-2007