I have created this php file so that users can apply online. There is two areas thou where I need them to upload a picture. I listed those values as 'headshot' and 'bodyshot'. What else do I need add to this php so that the files will attach properly and send?
I am new to learning this and would really like clear insight on what to add. Thank you for your time and help!
Current code:
PHP Code:
<?php
/* Email Variables */
$emailSubject = 'employment';
$webMaster = '[EMAIL]email@email.com[/EMAIL]';
/* Data Variables */
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['adress'];
$city = $_POST['city'];
$zipcode = $_POST['zipcode'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$howdidyouhear = $_POST['howdidyouhear'];
$age = $_POST['age'];
$uscitizen = $_POST['uscitizen'];
$driverlicense = $_POST['driverlicense'];
$transportation = $_POST['transportation'];
$adultservice = $_POST['adultservice'];
$bodycomfort = $_POST['bodycomfort'];
$headshot = $_POST['headshot'];
$bodyshot = $_POST['bodyshot'];
$startdate = $_POST['startdate'];
$hours = $_POST['hours'];
$weekdays = $_POST['weekdays'];
$aboutyou = $_POST['aboutyou'];
$whywork = $_POST['whywork'];
$questions = $_POST['questions'];
$body = <<<EOD
<br><hr><br>
First Name: $firstname <br>
Last Name: $lastname <br>
Address: $address <br>
City: $city <br>
Zip Code: $zipcode <br>
Phone: $phone <br>
Email: $email <br>
How did you hear about us: $howdidyouhear <br>
Age: $age <br>
Are you eligible to work in the US: $uscitizen <br>
Do you have a vaild Drivers License: $driverlicense <br>
Do you have reliable transportation: $transportation <br>
Have you worked in an adult/exotic service before: $adultservice <br>
On a scale how comfortable are you with your body: $bodycomfort <br>
Headshot: $headshot <br>
Bodyshot: $bodyshot <br>
When could you start: $startdate <br>
Total hours available per week: $hours <br>
What days are you available: $weekdays <br>
What you do now: $aboutyou <br>
Why you want to work for Cleaning Done Right: $whywork <br>
Questions for us: $questions <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
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=[URL]http://www.cleaningdoneright.com[/URL]">
<style type="text/css">
<!--
body {
background-color: #444; /* You can edit this CSS to match your website*/
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thank you. Your application has been successfully sent to Cleaning Done Right.</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
[put all PHP scripting between PHP code brackets so the script is shown as above]