The result of this error page results:
Notice: Undefined variable: name in C: \ xampp \ htdocs \ Techphp \ perfil.php on line 57, line 58, line 59 and line 60,
What are the line where the user profile data is.
What I do not understand is because it is giving this result. Is it not connected?
<?php
mysql_connect("localhost", "root", "angola") or die("cannot connect");
mysql_select_db("login_senha");
session_start();
$login = $_SESSION['login_usuario'];
$login = $_SESSION['login_usuario']=$login;
$sql = mysql_query( "SELECT * FROM usuario WHERE login='$login'");
while($linha= mysql_fetch_array($sql)){
$nome=$linha['nome'];
$email=$linha['email'];
$idade=$linha['idade'];
$cidade=$linha['cidade'] ;
$foto=$linha['foto'] ;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="/Techphp/css/estilo.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/Techphp/css/estilo.css"/>
<title>Untitled Document</title>
</head>
<body>
<div class="container">
<div class="menu">
<ul>
<li>
<a href="index.php">Voltar</a>
</li>
<li>
<a href="#">Administração</a>
</li>
</ul>
</div>
<div class="perfil">
<img src="fotos/<?php echo $foto?>" alt="imagem de perfil" title="imagem de perfil" />
</div>
<div class="dados">
<p>Nome</p><p><?php echo $nome?></p>
<p>Email</p><p><?php echo $email?></p>
<p>idade</p><p>40<?php echo $idade?></p>
<p>Cidade</p><p><?php echo $cidade?></p>
</div>
</div>
</body>
</html>