Implement update and delete user

This commit is contained in:
2020-06-17 04:10:09 +02:00
parent 219f440b26
commit e6b26d963b
7 changed files with 83 additions and 37 deletions

View File

@@ -25,6 +25,7 @@
$pdo = connectDatabase("practica", "practica", "practica");
$list = listUsers($pdo);
foreach($list as $row) :
if(!$row[5]):
?>
<tr>
<td><?php echo $row[0]; ?></td>
@@ -32,16 +33,18 @@
<td><?php echo $row[2]; ?></td>
<td><?php echo $row[3]; ?></td>
<td>
<a href="html/user_create_form.html?edit=" class="edit_btn">Editar</a>
<a href="forms/user_edit_form.php?edit=<?php echo $row[4]; ?>" class="edit_btn">Editar</a>
</td>
<td>
<a href="html/user_create_form.html?delete=" class="del_btn">Borrar</a>
<a href="user_management.php?delete=<?php echo $row[4]; ?>" class="del_btn">Borrar</a>
</td>
</tr>
<?php endif ?>
<?php endforeach ?>
<?php closeDatabase($pdo); ?>
</table>
<div style="text-align: right;">
<a href="html/user_create_form.html" class="create_btn" >Crear</a>
<a href="forms/user_create_form.html" class="create_btn" >Crear</a>
</div>
</body>
</html>