Skip to content
WJunction - Webmaster Forum

Radio Choice

Status
Not open for further replies.
hey

as im writing my own image script, i wanted to add a choice for users. so i written some test code b4 i implement, can any1 tell me if this wud work:

PHP:
<?php

    $selectRadio = $_POST['set_size'];
    
    if ( $selectRadio == '1' ) {
        
        //Do your thing
        
    } elseif ( $selectRadio == '2' ) {
        
        //Do your thing
        
    }



?>

<input name="set_size" type="radio" value="1">Forum Signature (180 px)

<input name="set_size" type="radio" value="2">Website Image  (360 px)
 

2 comments

yes
Your could will work fine

The posted data is the selected option value

In your case are: 1 and 2

So it will work fine :)
 
Status
Not open for further replies.

About the author

C
Banned · Joined
901
Messages
17
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom