Two-Step Database Search

Results 1 to 2 of 2

Thread: Two-Step Database Search

  1. #1
    Join Date
    Dec 1969

    Default Two-Step Database Search

    I have what is probably a pretty basic question. I want to create a page to search a database for notes on a customer. I am comfortable creating a search page and then displaying the results as text. But, in this case, I need to allow the user to search for a customer by name, city, state, or zip code on the first page, show a list of possible matches on the second page, (and this is where I&#039;m not sure what to do) and then select one of the possible matches to generate the third page with notes for that customer displayed. Where I am having trouble is figuring out how to allow selection of a customer from the second page, generating the query and sending the user to the third (results) page. Can I display my results on the second page as hyperlinks? If so, how, and how do I then generate the query from that link.<BR><BR>An example: I enter &#039;Atlanta&#039; into the &#039;City&#039; box and hit &#039;Search.&#039; My results page comes up with 13 possible matches, displaying their name, city, state, and zip code. From here (and this is where I am having trouble) I select one of the possible matches, which brings up my third page containing all the notes on this customer. <BR><BR>Thanks in advance for any advice!!

  2. #2
    Join Date
    Dec 1969

    Default you should look into the FAQ

    but to answer your question...<BR><BR>On page2 where you show all the matching records, you can make one of the column values(for example say first name) as a hyperlink(to page3) and pass the Unique Id along with the URL.<BR><BR>On page2,<BR>&#060;A HREF="page3.asp?UniqueID=&#060;%=ID%&#062;"&#062;< BR><BR>On page3, you retrieve the ID from the querystring and build up a SQL to show the detail on this page.<BR><BR>Hope that helps...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts