On your insert page the validation is attempting to validate the following variable:
The problem with the way you have implemented the validations is that this variable has not been set when the validation occurs at the top of the page. In order for this to work properly you will need to move the server validation code down further on the page. Line 14-28 on the insert page should be moved down to just before the insert that is currently on line 130. It must be the last thing before the insert in order for it to work properly.
As for the results page only showing three results what do you see when you test the recordset on this page? If you have any MySQL GUI type of tool you should run your sql in there as a test to see what results occur. You can also test out your results page by browsing directly to it without first visiting the search page, this should get it to load with the default where clause and none of the filtering occurring.