<?php session_start(); // inicia sesion //if (!empty($_SESSION["usuario"])) { //verifica si la variable de sesion no esta vacia include '../../db/tramite/Tipo.php'; include '../../db/tramite/Tramite.php'; $select_tipo = new Tipo(); $lista_tipo = $select_tipo->getall(); if (isset($_POST["registrar"])) { $add = new Tramite(); $add->add($_POST["nombre"], $_POST["duracion"], $_POST["tipo"]); } $combobit = ""; foreach ($lista_tipo as $row2) { $combobit .= "<option name='tipo' value ='" . $row2[0] . "'>" . $row2[2] . "</option>"; } ?> <html> <head> <link rel="stylesheet" href="../botones.css" type="text/css"> <link rel="stylesheet" href="agperfil.css" type="text/css"> <title>Agregar Tramite</title> </head> <body> * Campos con asterisco son obligatorios <h2 align="center">ESPECIFICACIONES TRAMITE</h2> <form action="" method="post"> <h3>Nombre del Tramite: <input type="text" name="nombre" pattern="[A-Za-z\s]{3,50}" maxlength="50" required size="50">*</h3>