No puedo mostar los datos del usuario logeado
Publicado por user1111 (30 intervenciones) el 05/10/2020 19:02:54
Ayuda por favor me da los siguientes errores:
session_start(): A session had already been started - ignoring in
Undefined index: id
Trying to access array offset on value of type null in (para lso echo del formulario)
session_start(): A session had already been started - ignoring in
Undefined index: id
Trying to access array offset on value of type null in (para lso echo del formulario)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
include 'perfilPhp/conP.php';
session_start();
/*if(!isset($_SESSION['id'])){
header("location:index.html");
}*/
$iduser = $_SESSION['id'];
$sql = "SELECT id, UserName, Email, ppassword FROM user WHERE id= '$iduser'";
$result = $conexion->query($sql);
$row = $result->fetch_assoc();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MyPerfil</title>
<link rel="stylesheet" type="text/css" href="assets/css/style_myPerfil.css">
<link rel="stylesheet" type="text/css" href="assets/css/normalize.css">
<link href = "https://fonts.googleapis.com/css2? family = Sansita: ital @ 1 & display = swap" rel = "stylesheet">
</head>
<body>
<main>
<header>
<a href="loginInde.php"><img src="assets/img/PNG.png" class="logo"></a>
<input type="text" id="inputSearch" name="inputSearch" class="buscador" placeholder="Buscar podcast">
<a href="upload.html"><img src="assets/img/upload.png" class="subir"></a>
<input type="checkbox" id="check">
<label for="check" class="icon-menu"><img class="userImg" src="assets/img/profile_picture.png"></label>
<nav class="menu">
<ul class="ul_1">
<li class="li_1"><a class="li_a" href="loginInde.php">Inicio</a></li>
<li class="li_1"><a class="li_a" href="playlist.html">Listas de reproducción</a></li>
<li class="li_1"><a class="li_a" href="fav.html">Favoritos</a></li>
<li class="li_1"><a class="li_a" href="confi.html">Configuración</a></li>
<li class="li_1"><a class="li_a" href="login(php)/outLogin.php">Cerrar sesión</a></li>
</ul>
</nav>
</header>
</main>
<div class="container1">
<div class="container_2">
<h1 class="title">Mi Perfil</h1>
<tr>
<ul>
<h3 id="imgPer">Imagen del perfil</h3>
<h3 id="nameUser">Nombre de usuario</h3>
<td><?php echo utf8_decode($row['UserName']); ?></td>
<h3 id="email">Correo electronico</h3>
<td><?php echo utf8_decode($row['Email']); ?></td>
<h3 id="pass">Contraseña </h3>
<td><?php echo utf8_decode($row['ppassword']); ?></td>
</ul>
</tr>
<a id="botEdit" href="perfilEdit.html">Editar mi perfil</a>
</div>
<div class="container_3"></div>
</body>
</html>
Valora esta pregunta


0