Hi guys

I have a simple PHP mail form that works whenever I use it, but the client says it doesn't work for him (takes him to a blank page on submit) and others have said it works about 85% of the time.. what gives?

Here's the PHP page the HTML form submits to:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?php $EmailFrom Trim(stripslashes($_POST['EmailFrom'])); 
$EmailTo "email@mail.com";
$Subject "Enrolment";
$Name Trim(stripslashes($_POST['Name'])); 
$Address Trim(stripslashes($_POST['Address'])); 
$Telephone Trim(stripslashes($_POST['Telephone'])); 

// validation
$validationOK=true;
if (
Trim($EmailFrom)==""$validationOK=false;
if (
Trim($Name)==""$validationOK=false;
if (!
$validationOK) {
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=enrol.htm\">";
  exit;
}

// prepare email body text
$Body "";
$Body .= "The following person has submitted an enrolment form on the .. website ";
$Body .= "\n";
$Body .= "\n";
$Body .= "DEPARTMENT: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Dept;
$Body .= "\n";
$Body .= "\n";
$Body .= "CONTACT NAME: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Name;
$Body .= "\n";
$Body .= "\n";
$Body .= "CONTACT EMAIL: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $EmailFrom;
$Body .= "\n";
$Body .= "\n";
$Body .= "CONTACT PHONE: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Phone;
$Body .= "\n";
$Body .= "\n";
$Body .= "CONTACT FAX: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Fax;
$Body .= "\n";
$Body .= "\n";
$Body .= "PREFERRED CONTACT METHOD: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $contact_me_via;
$Body .= "\n";
$Body .= "\n";
$Body .= "COURSE NAME: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Course;
$Body .= "\n";
$Body .= "\n";
$Body .= "COMMENTS: ";
$Body .= "\n";
$Body .= "-------------------";
$Body .= "\n";
$Body .= $Comments;
$Body .= "\n";




// send email 
$success mail($EmailTo$Subject$Body"From: <$EmailFrom>");

// redirect to success page 
if ($success){
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
}
else{
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=enrol.htm\">";
}
?>

<?php $EmailFrom "inquiries@email.com";
$EmailTo Trim(stripslashes($_POST['EmailFrom']));
$Subject "Enrolment";
$Name Trim(stripslashes($_POST['Name'])); 
$Address Trim(stripslashes($_POST['Address'])); 
$Telephone Trim(stripslashes($_POST['Telephone'])); 

// validation
$validationOK=true;
if (
Trim($EmailFrom)==""$validationOK=false;
if (
Trim($Name)==""$validationOK=false;
if (!
$validationOK) {
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=enrol.htm\">";
  exit;
}

// prepare email body text
$Body "";
$Body .= "\n";
$Body .= "You have received an auto-response from the .. website:";
$Body .= "\n";
$Body .= "------------------------------------";
$Body .= "\n";
$Body .= "\n";
$Body .= "Thankyou ";
$Body .= $Name;
$Body .= "\n";
$Body .= "\n";
$Body .= "Your enrolment enquiry has been received. A representative from this office will be in contact with you as soon as possible.";
$Body .= "\n";
$Body .= "\n";
$Body .= "If you have any further queries, please do not hesitiate to contact us by phone on (07) 3211 0128";
$Body .= "\n";
$Body .= "\n";
$Body .= "------------------------------------";



// send email 
$success mail($EmailTo$Subject$Body"From: <$EmailFrom>");

// redirect to success page 
if ($success){
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
}
else{
  print 
"<meta http-equiv=\"refresh\" content=\"0;URL=enrol.htm\">";
}
?>
</head>

<body>
<br>
</body>
</html>
The reason for the two functions is because I need one email to be sent to the person submitting the form to let them know their form as been received, and the other to notify the client that someone has left them a message on the form.

So I'm sure the way I did that even is probably way wrong and probably the cause of my trouble. Any hints anyone?

oh and if it helps here is the HTML form:
(ive just removed the table formatting so you can view it easier)

HTML Code:
<form method="post" action="enrol.php">

Organisation/Department
 <input name="Dept" type="text" id="Dept">

Contact Name 
<input name="Name" type="text" id="Name">

Contact Email 
<input name="EmailFrom" type="text" id="EmailFrom" />

Contact Phone 
<input name="Phone" type="text" id="Phone" />

Contact Fax 
<input name="Fax" type="text" id="Fax" />

Please contact me 
<select name="contact_me_via" class="phone">
        <option value="By Phone" selected="selected">By Phone</option>
        <option value="By E-mail">By E-mail</option>
</select>

Course Name 
<select name="Course" id="Course">
        <option selected="selected">Write Smarter ..</option>
        <option value="Write Smarter Foundations WS101">.. Foundations</option>
        <option value="Write Smarter Emails WS102">.. Emails</option>
        <option value="Write Smarter for the Public Sector WS103">.. for the Public Sector</option>
        <option value="Write Smarter Briefs and Reports WS104, WS104B, WS104R">.. Briefs and Reports </option>
        <option value="Write Smarter Punctuation and Grammar Basics WS105">.. Punctuation and Grammar Basics </option>
        <option value="Write Smarter Minute Taking WS106">.. Minute Taking </option>
        <option value="Write Smarter for Tertiary Students WS107">.. for Tertiary Students </option>
        <option value="Write Smarter Agenda Management and Minute Taking WS106">.. Agenda Management + Minute Taking </option>
                                                                  </select>

Comments
<textarea name="Comments" cols="30" rows="7" id="Comments">
</textarea>

<input name="submit" value="Submit" type="submit">
       
  </form>
Cheers,
Keira