@ 2017-07-07T01:53:42Z <?php
if(!empty($_POST["register-user"])) {
/* Form Required Field Validation */
foreach($_POST as $key=>$value) {
if(empty($_POST[$key])) {
$error_message = "Todos los datos son obligatorios. All Fields are required";
break;
}
}
/* Password Matching Validation */
if($_POST['password'] != $_POST['confirm_password']){
$error_message = 'Las claves deben ser iguales. Passwords should be same<br>';
}
/* Email Validation */
if(!isset($error_message)) {
if (!filter_var($_POST["EMAIL"], FILTER_VALIDATE_EMAIL)) {
$error_message = "El email no es vĂ¡lido. Invalid Email Address";
}
}
/* Validation to check if gender is selected */
if(!isset($error_message)) {
if(!isset($_POST["GENERO"])) {
$error_message = " Todos los datos son obligatorios. All Fields are required";
}
}
/* Validation to check if Terms and Conditions are accepted */
if(!isset($error_message)) {
if(!isset($_POST["terms"])) {
$error_message = "Debe aceptar las condiciones del registro";
}
}
if(!isset($error_message)) {
require_once("dbcontroller.php");
$db_handle = new DBController();
$query = "INSERT INTO registered_users (CI, password, NOMBRE, APELLIDO, GENERO, FECHA-NACIMIENTO, DIRECCION, CP, CIUDAD, PAIS, CELULARA, CELULARB, EMAIL) VALUES
('" . $_POST["CI"] . "' , '" . $_POST["password"] . "' , '" . $_POST["NOMBRE"] . "' , '" . $_POST["APELLIDO"] . "' , '" . $_POST["GENERO"] . "' , ['" . $_POST"FECHA-NACIMIENTO"] . "' , '" . $_POST["DIRECCION"] . "' , '" . $_POST["CP"] . "' , '" . $_POST["CIUDAD"] . "' , '" . $_POST["PAIS"] . "' , '" . $_POST["CELULARA"] . "' , '" . $_POST["CELULARB"] . "' , '" . $_POST["EMAIL"] . "')";
$result = $db_handle->insertQuery($query);
if(!empty($result)) {
$error_message = "";
$success_message = "Felicitaciones. Has completado el registro correctamente. Congratulations. You have registered successfully!";
unset($_POST);
} else {
$error_message = "No se completado el registro. Vuelve a intentarlo. Problem in registration. Try Again!";
}
}
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.1.7 0.030 0.010 14.82 7.1.6 0.057 0.017 33.20 7.1.5 0.040 0.010 32.59 7.1.4 0.050 0.013 32.41 7.1.3 0.053 0.013 32.44 7.1.2 0.063 0.010 32.85 7.1.1 0.040 0.013 14.57 7.1.0 0.037 0.007 14.64 7.0.20 0.033 0.007 14.81 7.0.19 0.033 0.010 14.74 7.0.18 0.040 0.007 14.16 7.0.17 0.037 0.017 14.43 7.0.16 0.033 0.017 14.16 7.0.15 0.040 0.013 14.13 7.0.14 0.033 0.023 14.34 7.0.13 0.030 0.010 14.35 7.0.12 0.217 0.007 14.39 7.0.11 0.037 0.007 14.33 7.0.10 0.027 0.010 14.20 7.0.9 0.040 0.013 14.32 7.0.8 0.030 0.013 14.39 7.0.7 0.037 0.013 14.25 7.0.6 0.040 0.013 14.13 7.0.5 0.040 0.013 14.41 7.0.4 0.043 0.013 14.27 7.0.3 0.037 0.017 14.72 7.0.2 0.043 0.010 14.33 7.0.1 0.043 0.010 14.34 7.0.0 0.040 0.010 14.41
preferences:dark mode live preview
135 ms | 1394 KiB | 7 Q