如何使用PHP验证下拉列表

I want to validate a form using PHP. Below is the sample of my form:

<form>
    <select name="select_box">
        <option value="0">Please Select</option>
        <option value="1">OPT 1</option>
        <option value="2">OPT 2</option>
    </select>
    <input type="submit" value="Go!" />
</form>
<?php 
if(isset($_REQUEST['select_box']) && $_REQUEST['select_box'] == '0') { 
  echo 'Please select a country.'; 
} 
?>
<?php
if ($_GET['select_box'] != '0') //form validation
{
 //your code here
}
?>

In your php script where are you are submitting your form (in this case it's the same script that echoes out the form, since you aren't specifying action and method attribute to your <form>), you can get values of inputs by doing $_GET['name_of_input'], which in your case:

if(isset($_GET['select_box'])) { // do something with value of drop down