I have coded file both in HTML and PHP but I'm not sure how to go about adding the PHP code to send the image file to the email as an attachement or something.
here is a copy of the code: (e-mail has been removed)
- Code: Select all
<?php
/* Subject and Email Variables */
$emailSubject = 'New Member';
$webMaster = 'email@address.com';
/* Gathering Data Variables */
$firstname = $_POST['firstname'];
$surname = $_POST['Surname'];
$day = $_POST['DateOfBirth_Day'];
$month = $_POST['DateOfBirth_Month'];
$year = $_POST['DateOfBirth_Year'];
$sex = $_POST['sex'];
$email = $_POST['email'];
$profession = $_POST['profession'];
$body = <<<EOD
<br><hr><br>
<strong>First Name:</strong><br> $firstname <br><br>
<strong>Surname:</strong><br> $surname <br><br>
<strong>D.O.B:</strong><br> $day - $month - $year <br><br>
<strong>Sex:</strong><br> $sex <br><br>
<strong>Email:</strong><br> $email <br><br>
<strong>Profession:</strong><br> $profession <br><br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Message Sent!</title>
<meta http-equiv="refresh" content="5;URL=http://www.hardkase.co.uk/">
<style type="text/css">
#text { width: 450px; margin: 100px auto 0 auto; }
body { width: 100%; height: 100%; background: black;}
h1, h2 {color: white;}
</style>
</head>
<div id="text">
<h1>Thank you for your application.</h1>
<h2>Your request will be dealt with as soon as possible and you will be notified by e-mail once your application has been approved.</h2>
</div>
</body>
</html>
EOD;
echo $theResults;
?>


