doubt regarding select box....urgent
in the below code i am getting data from database..according to the condition..
i want the available data in database to get displayed in selectbox..
for ex...
in the code i am getting color=rs("color")according to the condtion if(shirt=name)
if i get red, blue as result the i want these two colors to be in selectbox..
if its three colors means i want those three colors to get displayed in selectbox..
how to do this
regards
meenu
<%
set con=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
Con.Open "dsn=tshirt"
set rs=con.execute("select * from table1")
while not rs.eof
name=rs("name")
if(shirt=name)then
color1=rs("color")
%>
<select name="color">
<option value="<%=color1%>"><%=color1%></option>
<%
end if
rs.movenext
wend
%>