Good evening,
I need to populate a select
with database information, and when I open the edit page it brings me the option for that user already selected and the other database.
if (isset($_GET['id'])) {
$valor_selecionado = $row['grupo_acesso'];
}
Here I already get the field that comes from the bank of a certain logged in user.
I need to get this value and compare it with the others and mark it as $ selected and fill the select
with all other DB options and leave $ selected selected.
MySQL Query:
$result = $conexao->query("SELECT grupo_acesso FROM eventos GROUP BY grupo_acesso ORDER BY grupo_acesso");
I hope you have understood and thank you if you can help.
Hugs, John.