-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinicio.php
More file actions
46 lines (45 loc) · 1.01 KB
/
Copy pathinicio.php
File metadata and controls
46 lines (45 loc) · 1.01 KB
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
46
<head>
<title>
INICIO
</title>
<meta charset="utf-8">
<link rel="stylesheet" href="" type="text/css">
</head>
<body>
<div class="contenido" align="center">
<div class="navegacion">
<nav>
<a href=#>MI CUENTA</a>
<a href=#>EDITAR PERFIL</a>
<a href='logout.php'>CERRAR SESION</a>
</nav>
</div>
<?php
include_once('config/conexion.php');
session_start();
if(isset($_SESSION['sesion']))
{
$ses=$_SESSION['sesion'];
?>
<div class="saludo" align="right">
<?php echo 'logueado como: '.$_SESSION['sesion']; ?>
</div>
<?php
$query=mysql_query("SELECT * FROM producto pr INNER JOIN usuario us USING (id_usuario) WHERE us.rut_usuario='".$ses."'");
while ($reg=mysql_fetch_array($query)){
?>
<div class="tabla">
<table>
<?php echo $reg['nombre_producto']; ?>
</table>
</div>
<?php
}
}else {
echo "<script>alert('Su session ha expirado')</script>";
header('refresh:0;login.php');
}
mysql_close();
?>
</div>
</body>