icon
Job Application
--------------------------------------------------------------
"; return $mess; } function build_profile(){ $pos = $_POST['position']; $name = $_POST['fname']." ".$_POST['mi']." ".$_POST['lname']; $add = $_POST['addr']; $add2 = $_POST['city'].", ".$_POST['state']." ".$_POST['zip']; $mess = $pos." Inquiry"."
".draw_dash()."
PROFILE INFORMATION

".$name."
".$add."
".$add2; $mess .= "
P: ".$_POST['phone']."
C: ".$_POST['cell']."
".$_POST['email']; return $mess; } function build_school(){ $num = $_POST['num_scho']; $mess = "EDUCATION

"; for($i = 1; $i <= $num; $i++){ $mess .= $_POST['school'.$i]."
".$_POST['degree'.$i]."
".$_POST['school_city'.$i]."
".$_POST['school_state'.$i]."

"; } return $mess; } function build_work(){ $num = $_POST['num_jobs']; $mess = "WORK HISTORY

"; for($i = 1; $i <= $num; $i++){ $mess .= $_POST['company'.$i]."
".$_POST['duties'.$i]."
".$_POST['start_date'.$i]." - ".$_POST['end'.$i]."
".$_POST['work_address'.$i]."
".$_POST['work_city'.$i].", ".$_POST['work_state'.$i]." ".$_POST['work_zip'.$i]."

"; } return $mess; } function contains_bad_str($str_to_test) { global $bad; $bad_strings = array( "content-type:" ,"mime-version:" ,"multipart/mixed" ,"Content-Transfer-Encoding:" ,"bcc:" ,"cc:" ,"to:" ); foreach($bad_strings as $bad_string) { if(eregi($bad_string, strtolower($str_to_test))) { $bad = $bad_string; return true; } } return false; } function print_mail($to,$from,$sub,$mess){ echo $to."
".$from."
".$sub."
".$mess; } if(isset($_POST['submit'])){ $realmail = "resumes@dwisp.net"; $testmail ="fargodesign@hotmail.com"; $subject = "Job Inquiry: ".$_POST['position']; $from = $_POST['email']; $message .= build_profile()."
"; $message .= draw_dash(); $message .= build_school(); $message .= draw_dash(); $message .= build_work(); $message .= draw_dash(); $message .= "Comments

".$_POST['comments']; print_mail($realmail,$from,$subject,$message); $message = str_replace("
","\n",$message); if (contains_bad_str($message)) { $error = "Error BAD STRINGS FOUND!!!!
".$bad; } // if mail else{ //send email if(mail( $testmail, "Subject: $subject",$message, "From: ".$from)) {echo "

Thank you for your interest in our company";} else { echo "Error"; } //$mailed = true; } //else //print_r($_POST); } else{ ?>
Personal Information
Work History (up to 5 jobs)

Job 1

Education (up to 5 schools)

School 1