Database does not appear information

0

Well, I created a database in PhpMyAdmin with name students a table called information and put the data in it ...

Then I added it to my site when I add the code appears instead of the table information ...

Here is my code below:

< ?php
$tabela = msql_query("SELECT * FROM 'informacoes'") ;
    while($resultado = mysql_fetch_array($tabela)){

    }

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

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

    echo"informacoes $alunoid<br />$nome<br />$email<br />$turno<br />$UF<br />";

? >
    
asked by anonymous 30.04.2015 / 13:38

1 answer

0

Make the connection first and then search, try:

< ?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 "Informações: " . $resultado['idaluno'] . "<br/>" . resultado['nomealuno'] ."<br/>". resultado['email'] . "<br/>". resultado['turno'] . "<br/>" . resultado['uf'] . "<br/>";      
    }

? >
    
30.04.2015 / 14:14