-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
50 lines (41 loc) · 1011 Bytes
/
index.php
File metadata and controls
50 lines (41 loc) · 1011 Bytes
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
47
48
49
50
<?php
session_start();
require 'database.php';
/*
if(isset($_SESSION['id'])){
$records= $conn->prepare('SELECT id,correo,contraseña from login where id = :id');
$records->binParam(':id',$_SESSION['id']);
$records->excecute();
$results= $records->fetch(PDO::FETCH_ASSOC);
$user=null;
if(count($results)==1){
$user=$results;
}
}
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>INICIO</title>
</head>
<body>
<link rel="stylesheet" href="assets/css/estilos.css">
<!--Opcional para el encabezado-->
<?php
require 'partials/header.php'
?>
<?php if(!empty($user)): ?>
<br>BIENVENIDO.<?=$user['correo'] ?>
<br>Inicio de sesion exitoso
<a href="logout.php">Cerrar sesion</a>
<?php else: ?>
<h1>BIENVENIDO</h1>
<!--link a la hoja de estilos-->
<link rel="stylesheet" href="assets/css/estilos.css">
<a href="login.php">Iniciar sesion</a> or
<a href="signup.php">Registrarse</a>
<?php endif; ?>
</body>
</html>