Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $oRs = mysql_query("SELECT id, name FROM dropdown_options ORDER BY name ASC");
- ?>
- <select name="someSelect">
- <?
- while(list($lId, $sName) = mysql_fetch_array($oRs))
- {
- ?>
- <option value="<?= (int) $lId ?>"<?= $lId == $_GET['someSelect'] ? ' selected="selected"' : '' ?>><?= htmlentities($sName) ?></option>
- <?
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement