I'm not sure why you couldn't use an "almost" generic page: your
server hands the user the database-selection page, user selects a
database, and your server replies with a form page for the lookup in
which the <form action> field has been frobbed as needed so that when
the user completes the form, what they hand back to you embeds the name
of the database being selected. Does this page-rewriting really seem
awkward?
Otherwise, I don't see how you could do it; WWW being a stateless
protocol, they can hand you a query resulting from the completion of
the form in that "generic" page at any time, with nothing to determine
which database they're expecting to perform a lookup on...
)Rob