If it's a self calling page add a hidden field into your form called perhaps Mode and with a hard coded value of "Search"
Then wrap an if statement around the code that builds and runs the query that checks for $_GET["Mode"]=="Search" - i.e. so the page won't do anything until it has first been submitted.
At the moment it's running the query regardless I imagine, and the lack of anything in those variables means you get all records where those fields are blank - i.e. it's returning exactly what it's being asked to.
__________________
haggul
|