kwodlum
May 28th, 2008, 08:23 PM
I've done a search and I can't seem to find what I'm looking for, I have a deadline so I need help ASAP. Just help with one field to validate, than I can figure out the rest.
Here's the form: http://www.esl4work.com/form.html
Thanks in advance.
Here's the PHP code:
<?php
if(isset($_POST['submit'])) {
$firstName = $_POST['txtFirstName'];
$lastName = $_POST['txtLastName'];
$company = $_POST['txtCompany'];
$email = $_POST['txtEmail'];
$phone = $_POST['txtPhone'];
$hearAbout = $_POST['selHearAbout'];
$quest1 = $_POST['txtQuest1'];
$quest2 = $_POST['txtQuest2'];
$quest3 = $_POST['selQuest3'];
$quest4 = $_POST['txtOther'];
$quest5 = $_POST['txtQuest5'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "From: $firstName $lastName\nE-Mail: $email\n\n1. What are the current positions of the participants? \n$quest1\n\n2. Approximately how many participants would be interested in talking an ESL course? \n$quest2\n\n3. What English Proficiency would you place the majority of the participants? \n$quest3\n\n4. Which areas of English do the participants need improvement in? \n$check_msg\nOther:\n$quest4\n\n5. What are your organizations top three goals for running an on-site ESL program? \n$quest5\n";
header ('location: http://www.esl4work.com/thank-you.html');
mail($to, $subject, $body);
}
else {
header ('location: http://www.esl4work.com/error.html');
}
?>
Here's the form: http://www.esl4work.com/form.html
Thanks in advance.
Here's the PHP code:
<?php
if(isset($_POST['submit'])) {
$firstName = $_POST['txtFirstName'];
$lastName = $_POST['txtLastName'];
$company = $_POST['txtCompany'];
$email = $_POST['txtEmail'];
$phone = $_POST['txtPhone'];
$hearAbout = $_POST['selHearAbout'];
$quest1 = $_POST['txtQuest1'];
$quest2 = $_POST['txtQuest2'];
$quest3 = $_POST['selQuest3'];
$quest4 = $_POST['txtOther'];
$quest5 = $_POST['txtQuest5'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "From: $firstName $lastName\nE-Mail: $email\n\n1. What are the current positions of the participants? \n$quest1\n\n2. Approximately how many participants would be interested in talking an ESL course? \n$quest2\n\n3. What English Proficiency would you place the majority of the participants? \n$quest3\n\n4. Which areas of English do the participants need improvement in? \n$check_msg\nOther:\n$quest4\n\n5. What are your organizations top three goals for running an on-site ESL program? \n$quest5\n";
header ('location: http://www.esl4work.com/thank-you.html');
mail($to, $subject, $body);
}
else {
header ('location: http://www.esl4work.com/error.html');
}
?>