Hey Guys and Girls,

Im new to all this forum discussion thing so go easy on me please :P

anywhos, im currently studying IT and our brief wants us to design and create a website, me being good with site design i found it easy, until my online php application failed to work, keep getting an blank screen when i load it up:

(Asterix's are hiding my email from spambots just so you know)

<?php
function clean($data) {
$data = trim(stripslashes(strip_tags($data)));
return $data;
}
$exploits = "/(content-type|bcc:|cc:|document.cookie|onclick|onload)/i";
foreach ($_POST as $key => $val) {
$c[$key] = clean($val);

if (preg_match($exploits, $val)) {
exit("<p>No exploits, please!</p>");
}
}

$show_form = true;
$error_msg = NULL;

if (isset($c['submit'])) {
if (empty($c['name']) || empty($c['email']) || empty($c['comments'])) {
$error_msg .= "Name, e-mail and comments are required fields. \n";
} elseif (strlen($c['name']) > 50) {
$error_msg .= "The name field is limited at 15 characters. Your first name will do! \n";
} elseif (!ereg("^[A-Za-z' -]", $c['name'])) {
$error_msg .= "The name field must not contain special characters. \n";
} elseif (!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$",strtolower($c['email']))) {
$error_msg .= "That is not a valid e-mail address. \n";
}

if ($error_msg == NULL) {
$show_form = false;

if (!empty($c['Other Contact']) && !ereg("^(http|https)", $c['Other Contact'])) {
$c['url'] = "Other Contact:" . $c['Other Contact'];
}

$subject = "Online Application";

$message = "Online Application Form:";
foreach ($c as $key => $val) {
$message .= ucwords($key) . ": $val \n";
}
$message .= "IP: {$_SERVER['REMOTE_ADDR']} \n";
$message .= "Browser: {$_SERVER['HTTP_USER_AGENT']}";

if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) {
$headers = "From: chris@5*******";
$headers .= "Reply-To: {$c['email']}";
} else {
$headers = "From: Online Application Form <chris@************> \n";
$headers .= "Reply-To: {$c['email']}";
}

$recipient = "chris@***********";

if (mail($recipient,$subject,$message,$headers)) {
echo "<p>Your mail was successfully sent.</p>";
} else {
echo "<p>Your mail could not be sent this time.</p>";
}
}
}
if (!isset($c['submit']) || $show_form == true) {
function get_data($var) {
global $c;
if (isset($c[$var])) {
echo $c[$var];
}
}

if ($error_msg != NULL) {
echo "<p><strong style='color: red;'>ERROR:</strong><br />";
echo nl2br($error_msg) . "</p>";
}
?> <p>Online Application TEST FOR CHRIS'S IT WORK!</p>
<p>*Indicates Mandatory Field</p>
<form action="" method="post">
<p>FULL Name
<label>
<input type="text" name="name" id="name" value="<?php get_data("name"); ?>" />
</label>
</p>
<p>Email Address
<label><input type="text" name="email" id="email" value="<?php get_data("email"); ?> donthaveemail@dont_have_email.com" />
</label>
</p>
<p>Telephone Number
<label>
<input type="text" name="telephoneNumber" id="Other Contact" value="<?php get_data("telephoneNumber"); ?>" />
</label>
</p>
<p>Where did you hear about the election?
<label><input type="text" name="reasonForapplication" id="subject" value="<?php get_data("reasonForapplication"); ?>" />
</label>
</p>
<p>Referance No.1
<textarea name="References" id="references"><?php get_data("references"):?>
</textarea>
</p>
<p>Why You Think You Should Be Elected:

<label>
<textarea name="Manifesto" cols="70" rows="20" id="manifesto"><?php get_data("manifesto"); ?>
</textarea>
</label>
<br />
<input type="submit" name="submit" id="submit" value="Send" />
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form> <p>
<?php
}
?>