Hi,

one minor thing:
you somewhere have a colon rather than a semicolon:
Code:
<?php get_data("references"):?>
another minor thing: the email From header should read
Code:
From: "Application form" <you@yoursite.com>
so in php you want to say
Code:
$headers = "From: \"Application form\" <you@yoursite.com>";