Use something like this, just edit it to your needs:
<?php
// These are the variables
$name = ($_POST["name"]);
$job = ($_POST["job"]);
$aboutme = ($_POST["aboutme"]);
$email = ($_POST["email"]);
$to = "
[email protected]";
$subject = "Email subject";
$message = "email body";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// After the form is sent, the following makes sure the user entered everything in the form.
if ($_GET["action"] == "submit")
{
if ($name == "")
{
echo "Whoops! You didn't enter your name.";
exit;
}
if ($job == "")
{
echo "Whoops! You didn't enter a job to apply for.";
exit;
}
if ($aboutme == "")
{
echo "Whoops! You didn't enter anything about yourself.";
exit;
}
if ($email == "")
{
echo "Whoops! You didn't enter an email, we need this to contact you.";
exit;
}
echo "Thanks for applying, add whatever information you want here";
mail($to,$subject,$message,$headers);
exit;
}
// Now, its time to display the actual form
echo "Hi, here is the app form, add details about your site and whatever here.<br>
<br>
<form action=\"?action=submit\" method=\"post\">
Name:
<input type=\"text\" name=\"name\">
Job:
<input type=\"text\" name=\"job\">
Email:
<input type=\"text\" name=\"email\">
About me:
<input type=\"text\" name=\"aboutme\">";
That should work, I haven't tested it but i'm pretty sure it'll work.