if your pseudo code is accurate, you are merely checking if submit has a value, not what the value is.
I would suggest using a hidden input to determine what action your script takes on submission. ie,
<input type="hidden" name="action" value="search">
// cleanse all variables...
$action = $_POST['action']; // or $_GET...
// take action
if($action=='search') {
// ... do your query...
// print section2 or error
die;
}
if($action=='submit') {
// submit stuff to database
// print success or failure
die;
}
// print default form
This format will make it easier to keep track of what you need to do with submissions.
Relying on the value in a submit button can cause problems later on because you may change the value of the submit button, or someone may hit return instead of clicking on the button, etc. the "action" field will remain unchanged.
That being said, sometimes it is convenient to have multiple submits-- just be sure you know what the value is in each so you can check against it.