I've got a major problem that's annoying me loads!
I've got this big project website that I've got to create using ASP and running a MS access db behind. It's a book database with a book table with book name, book ID, subject_area, etc.etc.
I want to make a pull down menu with the subject areas in so you can display the results from a chosen category.
So far, for the form, I've got this:
this is the search page search.asp
QUOTE
<html>
<head>
<title>List Box Titles</title>
<head>
<body>
<h2>Search by subject category</h2>
<p><br>
<form method="get" action="results.asp">
<select name="subject" size="1">
<option value=accountancy>Accountancy</option>
<option value=computing>Computing</option>
<option value=dvds>DVDs</option>
</select>
<input type="submit">
</form>
</body>
</html>
then the results.asp is this:<head>
<title>List Box Titles</title>
<head>
<body>
<h2>Search by subject category</h2>
<p><br>
<form method="get" action="results.asp">
<select name="subject" size="1">
<option value=accountancy>Accountancy</option>
<option value=computing>Computing</option>
<option value=dvds>DVDs</option>
</select>
<input type="submit">
</form>
</body>
</html>
QUOTE
<html>
<head>
<title>Title Response</title>
<head>
<body>
<h1>Bibliographic Data</h1>
<%
varTitle= request.querystring("subject")
Set oRp=server.createobject("ADODB.recordset")
sqltext="Select * from books WHERE subject_area = "';response.write "<p> Title Searched: <b>" & subject_area &"</b>"
orp.open sqltext, "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("shop.mdb")
if orp.eof then
response.write varTitle & " Not Found"
else
response.write "<p>The Bibliographic Data is as follows:<br>"
response.write "<p>Book: <b>" & orp("Book_Name") & "</b><br>"
end if
response.write "<p> <a href='search.asp'>Another search</a>"
%>
</body>
</html>
<head>
<title>Title Response</title>
<head>
<body>
<h1>Bibliographic Data</h1>
<%
varTitle= request.querystring("subject")
Set oRp=server.createobject("ADODB.recordset")
sqltext="Select * from books WHERE subject_area = "';response.write "<p> Title Searched: <b>" & subject_area &"</b>"
orp.open sqltext, "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("shop.mdb")
if orp.eof then
response.write varTitle & " Not Found"
else
response.write "<p>The Bibliographic Data is as follows:<br>"
response.write "<p>Book: <b>" & orp("Book_Name") & "</b><br>"
end if
response.write "<p> <a href='search.asp'>Another search</a>"
%>
</body>
</html>
The bit hightlighted in red is wrong but i don't know how to reference it (maybe to the query string but I don't know how to?!)
I'd be grateful for any help!