I have 3 pages
The first is a search page where a user enters a query
The second page returns the query (request.getParameter) in a 'while' loop so if it is a case of similar words, the while loop will return multiple queries.
From there, all these queries have check boxes.
I want to check which query to remove. What I am afraid of is that if I delete using the check box, it will remove all entries associated with the query as these would all be captured within this while loop.
Not sure if I correctly understand you question but each checkbox should have different value.
So when you submit a form to delete, you get value from checkbox and delete only one record, the one with that value.