I'm trying to pass a variable, but it does not appear on the screen.
The error ...
Notice: Undefined index: operator_map in C: \ xampp \ htdocs \ System \ Views \ form_mapa_continua.php on line 58
Here is where I call the function:
$nome = $busca_mapas->busca_mapa($id);
Here is the function:
public function busca_mapa($id){
$conexao = Database::getConnection();
$busca = "SELECT * from mapa WHERE cod_mapa = $id;";
$mapa = $conexao->query($busca);
$retorno = $mapa->fetchAll(PDO::FETCH_ASSOC);
return $retorno;
}
Here is the html code where I print the variable (and that's where the error also appears):
<div class="disabled field">
<label>Nome do operador</label>
<input value="<?= $nome['operador_mapa'];?>" placeholder="<?=$nome['operador_mapa']?>">
</div>
The bank:
I can assure you that there is data in the bank.