Hello,
I want to pull data from a database and populate a drop down box. I want each record to be between its own <option> tage. But the code I've done makes all the records appear in the one option!
Any help appreciated.
Cheers
James
<%
Dim conn
Dim RSEmps
set conn = server.createobject ("adodb.connection"
conn.open "triumph"
set RSEmps = conn.execute ("Select location from projects"
If RSEmps.EOF Then
response.write "<b>There are no projects at present</b>"
Else
response.write "<select name='location'>"
%>
<option>
<% =RSEmps("location"
%></option>
<% end if
%></select><% conn.close %>
I want to pull data from a database and populate a drop down box. I want each record to be between its own <option> tage. But the code I've done makes all the records appear in the one option!
Any help appreciated.
Cheers
James
<%
Dim conn
Dim RSEmps
set conn = server.createobject ("adodb.connection"
conn.open "triumph"
set RSEmps = conn.execute ("Select location from projects"
If RSEmps.EOF Then
response.write "<b>There are no projects at present</b>"
Else
response.write "<select name='location'>"
%>
<option>
<% =RSEmps("location"
<% end if
%></select><% conn.close %>