PHP Required Form Fields

Hey everyone. First post to Kirupa. Thought I’d give it a shot. I have been working on trying to validate some form fields in a PHP form (without using flash). Does anyone have the code for this? Below is the code I have now that works perfect to send an email out from a form, but doesn’t validate.

[FONT=Courier New][SIZE=2][COLOR=Red]<?php
if(isset($_POST[‘submit’])) {

$to = "hi@yahoo.com";
$subject = “Request A Quote”;
$name_field = $_POST[‘name’];
$company_field = $_POST[‘company’];
$business_field = $_POST[‘business’];
$areacode_field = $_POST[‘areacode’];
$phone_field = $_POST[‘phone’];
$email_field = $_POST[‘email’];

foreach($_POST[‘check’] as $value) {
$check_msg .= "Checked: $value
";
}

$budget = $_POST[‘selectBudget’];
$heard = $_POST[‘selectHeard’];

$message = $_POST[‘message’];

$body = "From: $name_field
Company: $company_field
Type of Business: $business_field
Areacode: $areacode_field
Phone: $phone_field
E-Mail: $email_field
Service Desired: $check_msg
Budget: $budget
Heard: $heard
Message: $message
";

echo “Data has been submitted to $to!”;
mail($to, $subject, $body);

} else {

echo “blarg!”;

}
?>[/COLOR][/SIZE][/FONT]