Forum Moderators: open
This will create a simple search page, first build a form with a search field and pass this to a search results page.
Then you can use the following code
srchname = Replace(Request.Form("search"), "'", "''")
sSQL = "SELECT * FROM table WHERE field like "'%" &srchname& "%' order by field"
Then you can display all the results using
<%
IF rs.EOF AND rs.BOF THEN
Response.Write "Sorry, your search returned no results."
ELSE
rs.MoveFirst
Do While Not rs.EOF
Response.Write "Add your code here"
rs.MoveNext
Loop
end if
%>