Re: Multiple 'similar' dropdowns -> 1 query



Hmm, being the newbie i am, i still can't get it to work:
i have $result = mysql_fetch_array($get_result);

Works fine with a

do{
foo
}while($result = mysql_fetch_array($get_result));

It returns the following from the DB:

id code
____________
27 ABC becomes: <option value="27">ABC</option>
35 KNO becomes: <option value="35">KNO</option>
57 TRE etc.
81 FLO etc.
____________



But when i call your function like this:
echo mk_select('name_1', $result, 'find_this');
it returns 4 items wich is correct, but the first two
are one id, and the third and fourth are a code.

Something like this:
id code
____________
<option value="">27</option>
<option value="">27</option>
<option value="">KNO</option>
<option value="">KNO</option>
____________

i just can't figure it out ...

Greetings Frizzle.

.



Relevant Pages