use the same database search server behavior for each. dd the conditions to use the Query strings, and the conditions to use the form elements. If the query string does not exist, those conditions will be ignored, also, if the form elements do not exist, those conditions will be ignored.