diff --git a/README.org b/README.org
index de9758c..3f174e7 100644
--- a/README.org
+++ b/README.org
@@ -5,6 +5,5 @@ This project consists of an Information System for a Medical Institution.
** Technologies
- PHP
-- MariaDB
-- Nginx
-- Docker
+- Javascript (AJAX)
+- MySQL
diff --git a/html/user.html b/html/user.html
deleted file mode 100644
index f5f5ef2..0000000
--- a/html/user.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
- Gestión de usuarios
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/database.php b/src/database.php
index 40ea492..8beb84c 100644
--- a/src/database.php
+++ b/src/database.php
@@ -13,7 +13,7 @@ function closeDatabase($pdo) {
}
function displayResults($query) {
- while($row = $query->fetch()){
+ foreach($query->fetch(PDO::FETCH_ASSOC) as $row){
echo $row . "\n";
}
}
@@ -96,4 +96,18 @@ function listAppointments($pdo, string $doctor) {
findRows($pdo, "cita", "medico", $doctor);
}
+
+function displayUsers($query) {
+ foreach($query->fetch(PDO::FETCH_ASSOC) as $row){
+ echo $row["nombre"];
+ }
+}
+
+function listUsers($pdo) {
+ $query = "SELECT usuario.nombre, usuario.usuario, rol.nombre, usuario.correo FROM usuario
+ INNER JOIN rol ON usuario.rol = rol.codigo";
+ $result = $pdo->query($query)->fetchAll();
+ return $result;
+}
+
?>
diff --git a/src/user.php b/src/user.php
new file mode 100644
index 0000000..9d3562a
--- /dev/null
+++ b/src/user.php
@@ -0,0 +1,79 @@
+
+
+
+
+
+ Gestión de usuarios
+
+
+
+
+
+
+
+
+
+ Nombre |
+ Usuario |
+ Rol |
+ Correo |
+ Acciones |
+
+
+
+
+ |
+ |
+ |
+ |
+
+ Editar
+ |
+
+ Borrar
+ |
+
+
+
+
+
+
diff --git a/src/user_management.php b/src/user_management.php
index a8a07e8..99f540e 100644
--- a/src/user_management.php
+++ b/src/user_management.php
@@ -1,8 +1,16 @@