04-23-2017, 01:31 PM
Ok - so... it does update the DB - but when you open the page again, it does not show the item which was updated as the selected item, instead it just sows the first item that is populated in the option list...
So at this code:
<label>Linked User Account:</label>
<select name="linkeduserid" class="form-control">
<?php
foreach ($permOps as $permOp){
echo "<option value='$permOp->id'>$permOp->email</option>";
}
?>
</select>
The above populates the available options from a database. What I would like is that we get the current value of the item from the db and have that as the selected item...
Any ideas?
So at this code:
<label>Linked User Account:</label>
<select name="linkeduserid" class="form-control">
<?php
foreach ($permOps as $permOp){
echo "<option value='$permOp->id'>$permOp->email</option>";
}
?>
</select>
The above populates the available options from a database. What I would like is that we get the current value of the item from the db and have that as the selected item...
Any ideas?