\n"; echo "Error page\n"; echo "\n"; echo "

Error!

\n"; echo "

$message

\n"; echo "\n"; echo "\n"; exit(); } $action = ($HTTP_POST_VARS['action'] == "check") ? "check" : "display"; /* initialize errors array */ $errors['first'] = " "; $errors['last'] = " "; $errors['objective'] = " "; $errors['skills'] = " "; $errors['answer1'] = " "; $errors['answer2'] = " "; $errors['answer3'] = " "; $errors['education'] = " "; $errors['experience'] = " "; for ($i=1; $i<=5; $i++) { $errors["degree$i"] = " "; $errors["school$i"] = " "; $errors["major$i"] = " "; $errors["completed$i"] = " "; $errors["from$i"] = " "; $errors["to$i"] = " "; $errors["employer$i"] = " "; $errors["position$i"] = " "; $errors["reason$i"] = " "; } $has_errors = 0; if($action == "check") { /* Begin Data validation section */ $allOK = 1; // check first name if (empty($HTTP_POST_VARS['first'])) { $errors['first'] = "First name empty"; $allOK = 0; } elseif (ereg("[^a-zA-Z]", $HTTP_POST_VARS['first'])) { $errors['first'] = "First name invalid"; $allOK = 0; } // check last name if (empty($HTTP_POST_VARS['last'])) { $errors['last'] = "Last name empty"; $allOK = 0; } elseif (ereg("[^a-zA-Z]", $HTTP_POST_VARS['last'])) { $errors['last'] = "Last name invalid"; $allOK = 0; } // check objective if (empty($HTTP_POST_VARS['objective'])) { $errors['objective'] = "Objective empty"; $allOK = 0; } else { preg_match_all("/[0-9a-zA-Z]+/", $HTTP_POST_VARS['objective'], $matches); if (($cnt = count($matches[0])) > 30) { $errors['objective'] = "Objective too many words ($cnt)"; $allOK = 0; } } // check educations $emptyrow = 0; for ($i=1; $i<=5; $i++) { if ($HTTP_POST_VARS["degree$i"] == "--" && empty($HTTP_POST_VARS["school$i"]) && empty($HTTP_POST_VARS["major$i"]) && empty($HTTP_POST_VARS["completed$i"])) { $emptyrow++; continue; } // check degree if ($HTTP_POST_VARS["degree$i"] == "--") { $errors["degree$i"] = "Degree #$i empty"; $allOK = 0; } // check school if (empty($HTTP_POST_VARS["school$i"])) { $errors["school$i"] = "School #$i empty"; $allOK = 0; } // check major if (empty($HTTP_POST_VARS["major$i"])) { $errors["major$i"] = "Major #$i empty"; $allOK = 0; } // check date completed if (empty($HTTP_POST_VARS["completed$i"])) { $errors["completed$i"] = "Date completed #$i empty"; $allOK = 0; } else { $rtval = ereg("^([0-9][0-9])/[0-9][0-9][0-9][0-9]$", $HTTP_POST_VARS["completed$i"], $regs); if (!$rtval || $regs[1] == 0 || $regs[1] > 12) { $errors["completed$i"] = "Date completed #$i invalid"; $allOK = 0; } } } if ($emptyrow == 5) { $errors['education'] = "Education empty"; $allOK = 0; } // check experience $emptyrow = 0; for ($i=1; $i<=5; $i++) { $from_month = $from_year = ""; $to_month = $to_year = ""; if (empty($HTTP_POST_VARS["from$i"]) && empty($HTTP_POST_VARS["to$i"]) && empty($HTTP_POST_VARS["employer$i"]) && empty($HTTP_POST_VARS["position$i"]) && $HTTP_POST_VARS["reason$i"] == "--") { $emptyrow++; continue; } // check from if (empty($HTTP_POST_VARS["from$i"])) { $errors["from$i"] = "From #$i empty"; $allOK = 0; } else { $rtval = ereg("^([0-9][0-9])/([0-9][0-9][0-9][0-9])$", $HTTP_POST_VARS["from$i"], $regs); if (!$rtval || $regs[1] == 0 || $regs[1] > 12) { $errors["from$i"] = "From #$i invalid"; $allOK = 0; } else { $from_month = $regs[1]; $from_year = $regs[2]; } } // check to if (empty($HTTP_POST_VARS["to$i"])) { $errors["to$i"] = "To #$i empty"; $allOK = 0; } else { $rtval = ereg("^([0-9][0-9])/([0-9][0-9][0-9][0-9])$", $HTTP_POST_VARS["to$i"], $regs); if (!$rtval || $regs[1] == 0 || $regs[1] > 12) { $errors["to$i"] = "To #$i invalid"; $allOK = 0; } else { $to_month = $regs[1]; $to_year = $regs[2]; } } // check from compared with to if (!empty($from_month) && !empty($from_year) && !empty($to_month) && !empty($to_year)) { if ($from_year > $to_year || ($from_year == $to_year && $from_month > $to_month)) { $errors["from$i"] = "From #$i greater than to #$i"; $errors["to$i"] = "To #$i smaller than from #$i"; $allOK = 0; } } // check employer if (empty($HTTP_POST_VARS["employer$i"])) { $errors["employer$i"] = "Employer #$i empty"; $allOK = 0; } // check position if (empty($HTTP_POST_VARS["position$i"])) { $errors["position$i"] = "Position #$i empty"; $allOK = 0; } // check reason if ($HTTP_POST_VARS["reason$i"] == "--") { $errors["reason$i"] = "Reason for leaving #$i empty"; $allOK = 0; } } if ($emptyrow == 5) { $errors['experience'] = "Experience empty"; $allOK = 0; } // check skills if (empty($HTTP_POST_VARS['skills'])) { $errors['skills'] = "Skills and hobbies empty"; $allOK = 0; } else { preg_match_all("/[0-9a-zA-Z]+/", $HTTP_POST_VARS['skills'], $matches); if (($cnt = count($matches[0])) < 25) { $errors['skills'] = "Skills and hobbies too few words ($cnt)"; $allOK = 0; } } // check answers for ($i=1; $i<=3; $i++) { if (empty($HTTP_POST_VARS["answer$i"])) { $errors["answer$i"] = "Answer #$i empty"; $allOK = 0; } else { preg_match_all("/[0-9a-zA-Z]+/", $HTTP_POST_VARS["answer$i"], $matches); if (($cnt = count($matches[0])) < 75) { $errors["answer$i"] = "Answer #$i too few words ($cnt)"; $allOK = 0; } } } /* End Data validation section */ if ($allOK) { $action = "process"; } else { $action = "display"; $has_errors = 1; } } /* replacement: \' => ' \" => " < => < */ $HTTP_POST_VARS['first'] = preg_replace("/\\\'/", "'", $HTTP_POST_VARS['first']); $HTTP_POST_VARS['first'] = preg_replace('/\\\"/', """, $HTTP_POST_VARS['first']); $HTTP_POST_VARS['first'] = preg_replace("/ Resume Form
There are errors in your resume. Please correct them before resubmission."; } ?>

Name

First*

Last*

Objective*

(less than 30 words)
Education
Degree*

School*

Major*

Date completed (mm/yyyy)*

Degree

School

Major

Date completed (mm/yyyy)

Degree

School

Major

Date completed (mm/yyyy)

Degree

School

Major

Date completed (mm/yyyy)

Degree

School

Major

Date completed (mm/yyyy)

Experience

From (mm/yyyy)*

To (mm/yyyy)*

Employer*

Position*

Reason for leaving*

From (mm/yyyy)

To (mm/yyyy)

Employer

Position

Reason for leaving

From (mm/yyyy)

To (mm/yyyy)

Employer

Position

Reason for leaving

From (mm/yyyy)

To (mm/yyyy)

Employer

Position

Reason for leaving

From (mm/yyyy)

To (mm/yyyy)

Employer

Position

Reason for leaving

Skills and hobbies*

(25+ words)
Answers to Questions

1. What makes you qualified for this position?*
(The answer should be detailed. Here you are "selling" yourself to the employer. Be eloquent!)
(75+ words)
2. What are some of your greatest achievements from past employment/experience?*
(You have to tell the employer that you are capable of being a great team player, can lead the team and achieve set goals.)
(75+ words)
3. Suppose you were in a position of leadership/authority in this firm. How would you go about firing an employee who is not performing up to expectations?*
(Here again the employee is looking at how you can come up with a smart answer. Make sure you think it over.)
(75+ words)

* Required Fields

\n"); fwrite($fd, "\n"); fwrite($fd, "\t\n"); fwrite($fd, "\t\t".$HTTP_POST_VARS['first']."\n"); fwrite($fd, "\t\t".$HTTP_POST_VARS['last']."\n"); fwrite($fd, "\t\n"); fwrite($fd, "\t".$HTTP_POST_VARS['objective']."\n"); fwrite($fd, "\t\n"); for ($i=1; $i<=5; $i++) { if ($HTTP_POST_VARS["degree$i"] == "--") { continue; } fwrite($fd, "\t\t\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["degree$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["school$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["completed$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["major$i"]."\n"); fwrite($fd, "\t\t\n"); } fwrite($fd, "\t\n"); fwrite($fd, "\t\n"); for ($i=1; $i<=5; $i++) { if ($HTTP_POST_VARS["reason$i"] == "--") { continue; } fwrite($fd, "\t\t\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["from$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["to$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["employer$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["position$i"]."\n"); fwrite($fd, "\t\t\t".$HTTP_POST_VARS["reason$i"]."\n"); fwrite($fd, "\t\t\n"); } fwrite($fd, "\t\n"); fwrite($fd, "\t".$HTTP_POST_VARS['skills']."\n"); fwrite($fd, "\tWhat makes you qualified for this position?\n"); fwrite($fd, "\t".$HTTP_POST_VARS['answer1']."\n"); fwrite($fd, "\tWhat are some of your greatest achievements from past employment/experience?\n"); fwrite($fd, "\t".$HTTP_POST_VARS['answer2']."\n"); fwrite($fd, "\tSuppose you were in a position of leadership/authority in this firm. How would you go about firing an employee who is not performing up to expectations?\n"); fwrite($fd, "\t".$HTTP_POST_VARS['answer3']."\n"); fwrite($fd, "\n"); fclose($fd); ?> Successful page

Your resume has been successfully uploaded!

 

You can view your resume in:

XML format   HTML format