Forum Moderators: coopster
$selectList = '<select name="some_list" id="some_list">';
Then read the records:
$select = "select id,title from table order by date_added";
while (($id,$title) = $sth->fetchrow_array) {
$selectList .= "<option value=\"$id\"">$title<\/option>\n";
}
$sth->finish;
$selectList .= "<\/select">\n";
The way I read the post, I don't think that's what's being asked ...
So, correct me if I'm wrong, but it appears that you are asking how to get a list of options returned in the same order they were selected. If that's what you're asking (list the entries of [a] dropdown box ... according to the time they are populated), it can't be done very easily. You would need to monitor the selection using JavaScript, and then either write a custom list or something similar to a hidden field, or set a cookie which can then be read server side.
Perhaps if you better clarify what exactly it is that you're asking.