O CÓDIGO MOSTRA QUANTAS LINHAS TEM NA TABELA DO MEU BANCO DE DADOS MAS NÃO MOSTRA OS DADOS
TIPO TEM 3 IDS COM 3 NOMES E 3 SOBRENOMES
SÓ QUE SÓ MOSTRA O NUMERO 3 COM O ROW MAS N AS INFORMAÇÕES
AI EM BAIXO TA O CÓDIGO ME AJUDEM!!!
<?php
include ("CONEXAO/conexao.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Projeto RPG </title>
<link rel="stylesheet" type="text/css" href="http://localhost/projeto_rpg/CSSdosite.css">
</head>
<body>
<?php
include ('fundo.php');
include ('cabecalho.php');
include ('corpo.php');
include ('rodape.php');
?>
<?php
$sql = "SELECT * FROM teste";
$query = mysql_query($sql);
$row = mysql_num_rows($query);
if ($row > 0){
while ($linha = mysql_fetch_array($query));
$nome = $linha['nome'];
$sobrenome= $linha['sobrenome'];
echo "seu nome é: $nome";
echo $sobrenome;
echo $row;
}else{
echo "não existem registros";
}
?>
</body>
</html>