Código HTML:
<html> <head></head> <body> <form name="prueba" method="post" action="valida.php"> Nombre: <input type="text" name="nombre"><br> Edad: <input type="text" name="edad"><br> Sexo: Hombre <input type="radio" name="sexo" value="hombre"> Mujer <input type="radio" name="sexo" value="mujer"> <input type="submit" value="Enviar"> </form> </body> </html>
Código PHP:
<?php
foreach ($_POST as $campos){
if (empty($campos)){
exit ("Revisar - Campos Formularios Vacios");
}
}
echo "Todo Perfes";
?>