From 5f174a911b031e20117a0ee54ebdd464e5e5304a Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 22 May 2018 18:44:27 +0200 Subject: [PATCH] =?utf8?q?Comprobaci=C3=B3n=20de=20los=20campos=20enviados?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- html/inscripcion.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/inscripcion.php b/html/inscripcion.php index a89fdd7..08a02de 100644 --- a/html/inscripcion.php +++ b/html/inscripcion.php @@ -146,6 +146,8 @@ if (in_array ("Cuenta", $Exigidos)) { if (isset($_POST["Confirmado"])) { # Datos enviados $_POST["Confirmado"] = "N"; # Inicialmente no confirmado + $Error = array(); + $GruposI = preg_filter ("/^_(.*)/", "$1", array_keys ($_POST)); if (! $GruposI) { $Error[] = $DI["errw"]["nohorario"]; @@ -154,7 +156,7 @@ if (isset($_POST["Confirmado"])) { # Datos enviados } foreach (array ("Nombre", "Apellido1", "Apellido2", "DNI", "Sexo", "Edad", "Cuenta") as $C) { - if (! $_POST[$C] && in_array ($C, $Exigidos)) { + if (empty ($_POST[$C]) && in_array ($C, $Exigidos)) { $Error[] = $DI["errw"]["no" . strtolower ($C)]; if ($C == "Cuenta") $Extra = $InfoCrear; } -- 2.30.2