04-23-2017, 01:56 PM
I manage to get the result changing the code to:
<select name="linkeduserid" class="form-control">
<?php
foreach ($permOps as $permOp){
if ($permOp->id == $companydetails->linkeduserid){
echo "<option value='$permOp->id' selected>$permOp->email</option>";;
}
else{
echo "<option value='$permOp->id'>$permOp->email</option>";
}
}
?>
</select>
<select name="linkeduserid" class="form-control">
<?php
foreach ($permOps as $permOp){
if ($permOp->id == $companydetails->linkeduserid){
echo "<option value='$permOp->id' selected>$permOp->email</option>";;
}
else{
echo "<option value='$permOp->id'>$permOp->email</option>";
}
}
?>
</select>