PD: Tuve que sacar algunos paises y años
Código PHP:
<FORM action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<P>
<center>
<h4><LABEL for="nombre">Nombre: </LABEL>
<INPUT type="text" name="nombre"><BR></br>
<LABEL for="apellido">Apellido: </LABEL>
<INPUT type="text" name="apellido"><BR></br>
<LABEL for="email">Email: </LABEL>
<INPUT type="text" name="email"><BR></br>
Sexo:</br></br>
<INPUT type="radio" name="sexo" value="Varón"> Varón<BR></br>
<INPUT type="radio" name="sexo" value="Mujer"> Mujer<BR></br>
</h4>
<h4>Año:
<select name="fecha">
<option>2009</option>
<option>2008</option>
<option>2007</option>
<option>2006</option>
<option>2005</option>
<option>2004</option>
<option>2003</option>
<option>2002</option>
<option>2001</option>
<option value=" 2000">2000</option>
<option>1999</option>
</select></h3>
<h4>Mes:
<select name="mes">
<option>Enero</option>
<option>Febrero</option>
<option>Marzo</option>
<option>Abril</option>
<option>Mayo</option>
<option>Junio</option>
<option>Julio</option>
<option>Agosto</option>
<option>Septiempre</option>
<option value=" 2000">Octubre</option>
<option>Noviembre</option>
<option>Diciembre</option>
</select>
<h4>Dia:
<select name="dia">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option value=" 2000">10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option value=" 2000">22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select></br></br>
<h4>Pais:
<select name="pais">
<option value="Afganistán ">Afganistán </option>
<option value="Akrotiri ">Akrotiri </option>
<option value="Albania ">Albania </option>
<option value="Alemania ">Alemania </option>
<option value="Andorra ">Andorra </option>
<option value="Angola ">Angola </option>
<option value="Anguila ">Anguila </option>
<option value="Antártida ">Antártida </option>
<option value="Antigua y Barbuda ">Antigua y Barbuda </option>
<option value="Antillas Neerlandesas ">Antillas Neerlandesas </option>
<option value="Arabia Saudí ">Arabia Saudí </option>
<option value="Arctic Ocean ">Arctic Ocean </option>
<option value="Argelia ">Argelia </option>
<option value="Argentina ">Argentina </option>
<option value="Armenia ">Armenia </option>
<option value="Aruba ">Aruba </option>
<option value="Ashmore andCartier Islands ">Ashmore andCartier Islands </option>
<option value="Atlantic Ocean ">Atlantic Ocean </option>
<option value="Australia ">Australia </option>
<option value="Austria ">Austria </option>
<option value="Azerbaiyán ">Azerbaiyán </option>
<option value="Bahamas ">Bahamas </option>
<option value="Bahráin ">Bahráin </option>
<option value="Bangladesh ">Bangladesh </option>
<option value="Barbados ">Barbados </option>
<option value="Bélgica ">Bélgica </option>
<option value="Belice ">Belice </option>
<option value="Benín ">Benín </option>
<option value="Bermudas ">Bermudas </option>
<option value="Bielorrusia ">Bielorrusia </option>
<option value="Birmania Myanmar ">Birmania Myanmar </option>
<option value="Bolivia ">Bolivia </option>
<option value="Bosnia y Hercegovina ">Bosnia y Hercegovina </option>
<option value="Botsuana ">Botsuana </option>
<option value="Brasil ">Brasil </option>
</option>
<option value="República Dominicana ">República Dominicana </option>
<option value="Ruanda ">Ruanda </option>
<option value="Rumania ">Rumania </option>
<option value="Rusia ">Rusia </option>
<option value="West Bank ">West Bank </option>
<option value="World ">World </option>
<option value="Yemen ">Yemen </option>
<option value="Yibuti ">Yibuti </option>
<option value="Zambia ">Zambia </option>
<option value="Zimbabue ">Zimbabue </option>
</select>
</br></br>
<INPUT name="submit" type="submit" value="Enviar"> <INPUT type="reset">
<p>
</FORM>
<?php
//$link = mysql_connect("localhost", "root");
$submit = $_POST['submit'];
if ($submit == true){
$fecha= $_POST['fecha'];
$mes= $_POST['mes'];
$dia= $_POST['dia'];
$nombre= $_POST['nombre'];
$apellido= $_POST['apellido'];
$email= $_POST['email'];
$sexo= $_POST['sexo'];
$pais= $_POST['pais'];
echo "<h3>Errores</h3></br></br>";
if(empty($_POST['fecha'])){echo "Campo fecha vacio </br>";} // No muestra el error
if(empty($_POST['mes'])){echo "Campo mes vacio </br>";} //No muestra el error
if(empty($_POST['dia'])){echo "Campo dia vacio </br>";} //No muestra el error
if(empty($_POST['nombre'])){echo "Campo nombre vacio </br>";}
if(empty($_POST['apellido'])){echo "Campo apellido vacio </br>";}
if(empty($_POST['email'])){echo "Campo email vacio </br>";}
if(empty($_POST['sexo'])){echo "Campo sexo vacio </br>";}
if(empty($_POST['pais'])){echo "Campo pais vacio </br>";} //No muestra el error
} else {
};
?>
</center>