1
I have in my database a value for user level and I would like to be able to modify it in the change. I need to load the level of the logged in user when opening the page:
<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 have already done the select
, I just need to take this level (of the selected user), for example "1" and, when opening the page, show the option <option value="1">Administrador</option>
.
The question of user validation for each area is quiet to do. My doubt at the moment is only this in relation to the Dropdown HTML with PHP.
From now on I thank everyone and all the answers!
you want to apply the
selected
option? these values are fixed or come from the bank?– rray