Problem with Echo php [duplicate]

-1

I'm trying to search a system here for a college job, but when it displays the result it appears:

0) { echo "$count resultados encontrados!"; } while ($dados = mysql_fetch_array($sql)) { echo "$dados[nome] $dados[email]"; } ?>

The code looks like this:

include "config.php";

$busca = $_POST['busca'];

$sql = mysql_query("SELECT *
    FROM funcionario
    WHERE nome LIKE '%$busca%' OR email LIKE '%$busca%' ");

    $count = mysql_num_rows($sql);

    $noticia = mysql_fetch_assoc($sql);

if ($count == 0) {
    echo "Nenhum resultado!";
}

if ($count > 0) {
        echo "$count resultados encontrados!";
    }

while ($dados = mysql_fetch_array($sql)) {
    echo "$dados[nome] $dados[email]";
}

Could you please help me find the error?

    
asked by anonymous 24.06.2015 / 03:18

1 answer

0

Short tags must be enabled for < ? to work:

php.ini

short_open_tag=On

link

    
24.06.2015 / 03:55