I can not display my database information on page

1

I created my database php , I made the connection to mysql , but the data that exists in my table in PhpMyAdmin , what appears is this:

" . resultado['nome'] ."
". resultado['email'] . "
". resultado['turno'] . "
" . resultado['uf'] . "
"; } ?>

... Here is my code below:

<?php

$host = "localhost";
$bd = "alunos";
$user = "root";
$senha = "";

$conexao = mysql_connect ($host, $user, $senha) or die (mysq_error());
mysql_select_db($bd, $conexao);

$tabela = msql_query("SELECT * FROM informacoes") ;
    while($resultado = mysql_fetch_array($tabela)){
       echo "informacoes:". $resultado['idaluno'] . "<br/>" . resultado['nome'] ."<br/>". resultado['email'] . "<br/>". resultado['turno'] . "<br/>" . resultado['uf'] . "<br/>";      
    }

?>
    
asked by anonymous 04.05.2015 / 15:25

2 answers

1

Two proven problems:

  • Absence of $ .
  • If you are viewing the source code then it is not running, check if you are using localhost (right) or file:\\ (wrong).
  • 04.05.2015 / 15:30
    1

    Variables are accessed with $ before the name: $ result and not result

        
    04.05.2015 / 15:27