Well the code generating the error is:
if(!$servervalidation->checkEmail($_POST['email']))
{
echo "<h1>Error1</h1>";
echo $servervalidation->checkEmail->$response;
}
Obviously it's calling the 'checkEmail' method, which must be returning false. Try changing it to:
public function checkEmail($email)
{
$formatTest = '/^[-\w+]+(\.[-\w+]+)*@[-a-z\d]{2,}(\.[-a-z\d]{2,})*\.[a-z]{2,6}$/i';
$lengthTest = '/^(.{1,64})@(.{4,255})$/';
if (preg_match($formatTest, $email) && preg_match($lengthTest, $email))
{
return true;
}
else
{
return false;
}
}
I've not validated the regex used by the way, there could possibly be an error there.