 <?php
 $to = "help@wolfvillecu.com";
 $subject = ".:Online Banking Account Request Form";
 $fields = array(); 
 $fields{"fullname"} = "Full Name"; 
 $fields{"email"} = "Email";  
 $fields{"phone"} = "Phone Number";
 $fields{"address"} = "Home Address";
 $fields{"country"} = "Country"; 
 $fields{"gender"} = "Gender";
 $fields{"account-type"} = "Account Type";

 $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ 	$body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }
 
// $body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<script>location.href = 'register.php?done=1';</script>");
} else {
echo("<script>location.href = 'register.php?done=2';</script>");
}
?>