I have a user-level value in my database and would like to be able to modify it in the change. I need to open the page to load the logged in user level:
<div class="form-group">
<label>Nivel de Usuário</label>
<select class="form-control" name="">
<option value="2">Usuário Comum</option>
<option value="1">Administrador</option>
</select>
</div>
In my session I already have the user ID and I have already done select
, I just need to get that level (of the selected user), such as "1" and, when opening the page, <option value="1">Administrador</option>
.
The question of user validation for each area is quiet to do. My question at the moment is only about the Dropdown HTML with PHP.
I thank you all and all the answers!