|
|
|
|
|
| | |
|
vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
something about dropdown box and search |
From: |
Brandon |
Date: |
9/14/2001 11:44:26 PM |
IP: |
128.250.6.245 |
This is how I create dropdown box(search.asp):
<td>
<select name="search_state" size="1">
<option>ANY</option>
<option>ACT</option>
<option>NSW</option>
</select>
</td>
This is how I list out result(search_results.asp):
<%
DIM dataRS, SQLtext
Set dataRS = Server.CreateObjec("ADODB.Recordset")
SQLtext ="SELECT * from Researcher where State ='" & Request.Form("search_state") & "' order by Surname "
set dataRS = mydb.Execute(SQLtext)
%>
<%
do while not dataRS.EOF
response.write "<tr><td><b>" & dataRS("FirstName") & " " & dataRS("Surname") </td>"
response.write "</tr>"
dataRS.moveNext
loop
%>
Question:
If I want to list out everyone in every single state(i.e. ACT + NSW) when user chose 'ANY' in the dropdown box, what can I do to achieve that?
thanks |
Follow Up - Re: something about dropdown box and search - Atahualpa 9/17/2001 8:00:36 AM
|
|
|
|
|
|
|
|
|
|
|
|