Here we go, sorry for the wait - the code is below and you can preview it at http://jspace.netai.net/email (sending disabled).
form.php:
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'></script>
<script type='text/javascript'>
// JQuery Start
$(document).ready(function() {
$('#form_button').click(function() {
habboname = $('#form_habbo').val();
forumname = $('#form_forum').val();
email = $('#form_email').val();
job = $('#form_job').val();
xp = $('#form_xp').val();
reason = $('#form_reason').val();
$.post('send_mail.php', {habbo_name: habboname, forum_name: forumname, email: email, job: job, xp: xp, reason: reason}, function(returns) {
if (returns == 'error_empty') {
$('#form_warning').fadeIn(500).html("All fields are required.");
}
else {
$('#form_warning').fadeIn(500).html("Application Sent");
$('#form').fadeOut(500);
}
});
});
});
// JQuery End
</script>
<style>input, textarea {text-align:center;}</style>
</head>
<body>
<center>
<div id='form_warning' style='text-align:center;border: 2px solid #E41B17; background:#F62217; width:30%; height:20px; font-weight:bold;color:#ffffff;display:none;'></div>
<div id='form'>
Habbo Name:<br /> <input type='text' id='form_habbo'> <br />
Forum Name:<br /> <input type='text' id='form_forum'> <br />
Email:<br /> <input type='text' id='form_email'> <br />
What job are you applying for?<br /> <select id='form_job'>
<option value='job1'>Job 1</option>
<option value='job2'>Job 2</option>
</select> <br />
Experience: <br /> <textarea id='form_xp' cols='30' rows='5'></textarea><br />
Why do you want this job? <br /> <textarea id='form_reason' cols='30' rows='5'></textarea><br />
<input type='submit' value='Send' id='form_button'>
</div>
</center>
</body>
</html>
send_mail.php:
<?php
///////////////////////////////////////////////
// Enter your email inside the quotation marks
$to = "
[email protected]";
//////////////////////////////////////////////
if (isset($_POST['habbo_name'], $_POST['forum_name'], $_POST['email'], $_POST['job'], $_POST['xp'], $_POST['reason'])) {
$habbo = $_POST['habbo_name'];
$forum = $_POST['forum_name'];
$email = $_POST['email'];
$job = $_POST['job'];
$xp = $_POST['xp'];
$reason = $_POST['reason'];
if (empty($habbo)||empty($forum)||empty($email)||empt y($job)||empty($xp)||empty($reason))
echo "error_empty";
else {
$message = "
Habbo Name: $habbo
Forum Name: $forum
Email: $email
Job they want: $job
Experience: $xp
Why they want the job: $reason
";
mail($to, "Application Form [$job]", $message, "From: Application Form");
}
} else exit();
?>