public static function editar()
 {
     try {
         $arrayUser = array();
         $arrayUser['Nombres'] = $_POST['Nombres'];
         $arrayUser['Apellidos'] = $_POST['Apellidos'];
         $arrayUser['Telefono'] = $_POST['Telefono'];
         $arrayUser['User'] = $_POST['User'];
         $arrayUser['Password'] = $_POST['Password'];
         $arrayUser['Tipo'] = $_POST['Tipo'];
         $arrayUser['Estado'] = $_POST['Estado'];
         $arrayUser['idUsuarios'] = $_POST['idUsuarios'];
         var_dump($arrayUser);
         $usuario = new usuarios($arrayUser);
         $usuario->editar();
         header("Location: ../editar.php?respuesta=correcto");
     } catch (Exception $e) {
         header("Location: ../editar.php?respuesta=error");
     }
 }
Ejemplo n.º 2
0
 public static function editar()
 {
     try {
         $arrayUser = array();
         $arrayUser['TipoUsuario'] = $_POST['tipoUsuario'];
         $arrayUser['TipoDocumento'] = $_POST['tipoDocumento'];
         $arrayUser['Documento'] = $_POST['Documento'];
         $arrayUser['Nombres'] = $_POST['nombre'];
         $arrayUser['Apellidos'] = $_POST['apellido'];
         $arrayUser['FechaNacimiento'] = $_POST['fechaN'];
         $arrayUser['Telefono'] = $_POST['telefono'];
         $arrayUser['Direccion'] = $_POST['direccion'];
         $arrayUser['Estado'] = "Activo";
         $arrayUser['User'] = $_POST['user'];
         $arrayUser['Pass'] = $_POST['pass'];
         $usuario = new usuarios($arrayUser);
         $usuario->editar();
         header("Location: ../V/pages/tables.php");
     } catch (Exception $e) {
         //throw new Exception($e->getMesssage());
         //header("Location: ../editar.php?respuesta=error");
     }
 }