For example:
If you create a submit form field for the "view all" function. Then say name it "view_all".
Then when someone submits the form with the "view all" button instead of the regular "search" button, you'll get an HTTP_VAR with the index "view_all" with the value "View All".
Eg: If it was an HTTP POST then you would get
$_POST['view_all']; // with the value 'View All'
So in your code you can branch the validation block:
[PHP]if (!$lname && !isset($_POST['view_all']))
{
echo "You have not filled the required fields. Please try again.";
include "search.inc";
exit;
} elseif (isset($_POST['view_all']) {
// select everything (best if you add a limit and pagination)
$sql = mysql_query("SELECT * FROM my_search_table LIMIT [pagination limit]") or die(mysql_error();
} else {
// your regular query
$sql = mysql_query("SELECT brideLname, groomLname FROM my_search_table WHERE brideLname LIKE '%". $lname ."%' OR groomLname LIKE '%". $lname ."%'") or die(mysql_error();
}
[/PHP]
Notice I've put the SQL statements in the validation blocks. Its the only thing that should depend on the validation.
hope that helps a bit..