mandatory fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ajd335
    New Member
    • Apr 2008
    • 123

    #1

    mandatory fields

    Hi..
    there are some radio buttons,which are mandatory in my site.
    So how can i find whether they are filled by the user or not ..so that i can respond accordingly.(i. e if all mandatory fields are remaining then , should be a warning display about the same..)

    Code:
    <input type="radio" name="small" value="N" autocomplete="off"  />
    <input type="radio" name="small" value="hidden";value = "required"/>
    i have used the second one just to mention the field is required..
  • aktar
    New Member
    • Jul 2006
    • 105

    #2
    [PHP]if (empty($_POST['small'])){

    //radio is empty

    }else{

    //not empty
    }[/PHP]

    Comment

    Working...