I'm not a php programmer, but I achieve exactly what you require in ASP, and it should be pretty easy to transpose the code to PHP.
Code:
sql = "SELECT ModelName FROM [PDA_Data]ORDER BY ModelName"
rsPDA.Source = sql
rsPDA.open()
If rsPDA.eof Then
rsPDA.AddNew
End If
do while not rsPDA.eof
strMdlOptions = strMdlOptions & "<option>"
strMdlOptions = strMdlOptions & rsPDA("ModelName")
strMdlOptions = strMdlOptions & "</option>" & vbNewLine
rsPDA.MoveNext
loop
The strMdlOptions should now consist of each of the models surrounded by option tags.
This can then be used in your form:
Code:
<SELECT NAME="Model">
<% = strMdlOptions %>
</SELECT>
(here the <%= strMdlOptions%> inserts the strMdlOptions, use the php equivalent)
That should work a dream.