consulta sql solo me muestra un registro de la bd
Publicado por manuel (1 intervención) el 27/04/2018 19:58:17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
session_start();
include '2.php';
if(!isset($_SESSION["usuario"])){
header("Location:1.php");
}
?>
<?php
$Usuario = $_SESSION['usuario'];
$sql = "SELECT*FROM usuarios WHERE usuario = '$Usuario'";
$result=$mysqli->query($sql);
$datos = $result->fetch_assoc();
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<table>
<tr>
<td style="text-align:center">ID</td>
<td style="text-align:center">USUARIO</td>
<td style="text-align:center">PASSWORD</td>
<td style="text-align:center">IDP</td>
<td style="text-align:center">IDT</td>
</tr>
<tr>
<td style="text-align:center"><?php echo utf8_decode( $datos['id']); ?></td>
<td style="text-align:center"><?php echo utf8_decode( $datos['usuario']); ?></td>
<td style="text-align:center"><?php echo utf8_decode($datos['password']); ?></td>
<td style="text-align:center"><?php echo utf8_decode($datos['id_personal']); ?></td>
<td style="text-align:center"><?php echo utf8_decode( $datos['id_tipo']); ?></td>
</tr>
</table>
</form>
</body>
</html>
Valora esta pregunta
0