Rexolio
Technical User
- Aug 29, 2001
- 230
Hi guys,
I'm trying to run the following script, which fills in values for a drop down menu:
I've checked formid and it's being passed correctly and there's only one value that matches it in the database. I've used a similar script tons of time and it will make the appropriate entry "selected". But this isn't working and I swear to God, I can't for the life of me figure out why. Seriously, there is NOTHING different in the querystring value and the value I'm trying to match in the database. I've checked over and over again.
I'm baffled! Any suggestions?
![[bugeyed] [bugeyed] [bugeyed]](/data/assets/smilies/bugeyed.gif)
rexolio@bellsouth.net
"I'm not dumb. I just have a command of thoroughly useless information." - Calvin, of Calvin and Hobbes
I'm trying to run the following script, which fills in values for a drop down menu:
Code:
<%
formid = request.querystring("formid")
Set rs = conn.execute("SELECT * FROM table")
do while not rs.eof
if rs("formid") = formid then
formselected = " selected"
else
formselected = ""
end if
%>
<option value="<%=rs("value")%>"<%=formselected%>><%=rs("value")%></option>
<%
rs.movenext
loop
rs.close
%>
I've checked formid and it's being passed correctly and there's only one value that matches it in the database. I've used a similar script tons of time and it will make the appropriate entry "selected". But this isn't working and I swear to God, I can't for the life of me figure out why. Seriously, there is NOTHING different in the querystring value and the value I'm trying to match in the database. I've checked over and over again.
I'm baffled! Any suggestions?
![[bugeyed] [bugeyed] [bugeyed]](/data/assets/smilies/bugeyed.gif)
rexolio@bellsouth.net
"I'm not dumb. I just have a command of thoroughly useless information." - Calvin, of Calvin and Hobbes