Searching Data in Sqlite database with php

0

I'm trying to get the name of my session, and search the database for the data of who has this name, but echo does not return anything at all.

$nome = $_SESSION["Aluno"];


$results = $db->query('Select * from alunos where nome = $nome ');
while($row = $results->fetchArray()){
$row = (object) $row;
echo $row->nome."   /   ";
echo $row->disciplina."   / ";
echo $row->faltas." /  ";
echo $row->nota."     <br> ";
echo "----------"."<br>";

}

What am I doing wrong?

    
asked by anonymous 13.11.2018 / 21:56

0 answers