<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>BobbaFM Staff Applications</title>
</head>
<body background="habbo.gif">
<center>Please only send 1 application, however you may send another if you do not get through, this time?
<p>
<p>
<?php
if(isset($_POST['send'])) { //Checks if the applicant has submitted the form.
if((!$_POST['email']) || (!$_POST['name']) || (!$_POST['sub']) || (!$_POST['job'])) { //Make sure they have filled in all fields.
echo "Some fields have been left blank, please go back and refill them!"; //Display the error.
} //End the check on the fields.
else //Maybe..
{
$email = addslashes(htmlspecialchars($_POST['email'])); //Removes the slashes.
$name = addslashes(htmlspecialchars($_POST['name']));
$sub = addslashes(htmlspecialchars($_POST['sub']));
$job = addslashes(htmlspecialchars($_POST['job']));
$mail = "
[email protected]"; //Change this to the the email you want the message to go to.
$subject = "$name with the e-mail: $email has applied for the job: $job !"; //Displays the name and the job in the email subject.
$mess = "Heres their details:
<p>Name: $name
<br>Email: $email
<br>Job: $job
<br>Why we should choose them:
<br>$sub";
mail("$mail","$subject","$mess"); //We use the mail(); function to send the email.
echo "Your application has been sent, we will reply within 48 hours!"; //Hooharr! Success!
} //End the else.
} // End the post.
else //Form time!
{
echo "<form method='post' action='$_SERVER[PHP_SELF]'>
Email:<br>
<input type='text' name='email' size='30'><br>
Name:<br>
<input type='text' name='name' size='30'><br>
Job:<br>
<select name='job' size='1'>
<option value='Radio manager' value='Radio manager'>Radio manager (x3)</option>
<option value='Head DJ' value='Head DJ'>Head DJ (x6)</option>
<option value='DJ' value='DJ'>DJ (x12)</option>
<option value='News Manager' value='News Manager'>News Manager (x2)</option>
<option value='Senior Reporter' value='Senior Reporter'>Senior Reporter (x4)</option>
<option value='News Reporter' value='News reporter'>News reporter (x12)</option>
</select><br>
Why we should choose you (In as much detail as possible)<br>
<textarea name='sub' cols='45' rows='6'>If your application doesn't fill this, you don't have a chance :)</textarea><br>
<input type='submit' name='send' value='Submit'></form>";
//You can change these values or whatever, have fun.
} //End the last else.
?>
</center>
</body>
</html>
Tahts my code(Made by excellent) I don't get where to put them in :S