Do you come to the error.html-page, to the index.html-page or do you receive a blank page?
And why do you:
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
It’s probably better to do a header-redirect i.e.:
header("Location: http://www.seafairhaven.org.uk/error.html");
exit;
Also note that you have written two different error-pages: error.htm, and error.html
It’s a lot easier to diagnose if you explain exactly what happens when you try to send and a easy way to check where something goes wrong is to insert echo ’step 1’; etc so you know how far the script has run before dieing.