<tr>
<th>City</th>
<td> <select name="city">
<?php
$idx = $ucity; //id_user city
$selected = "";
foreach ($list as $row) {
$id = $row->id; //id master city
$selected = ($idx == $id ? 'selected="selected"' : ''); ?>
<option <?php echo $selected ?> value="<?php echo $row->id?>" >
<?= $row->city?>|<?= $row->id?>|<?= $idx?>
</option>
<?php }?>
</select>
</td>
</tr>
Langganan:
Posting Komentar (Atom)
0 Response to "edit combo dinamis ambil id php sesuai value dari database"
Posting Komentar