Validating form fields
If I understand your problem well, the problem is that you don't want an if clause to become too long and that you have a problem with empty parameters. Your way of checking seems right to me, for the other part I asked myself if you can't just add something like this to the functions namecheck() emailcheck() and messagecheck():

 if (strlen($fname) == 0 || strlen($lname) == 0) return false;


Furthermore in your code line with the checks you have two times the emailcheck instead of the messagecheck once:

  if (($namecheck === TRUE) &amp;&amp; ($emailcheck ===TRUE) &amp;&amp; ($emailcheck ===TRUE)) {


Good luck, hope it helped.

Jef