$value) { if (!isset($_POST['term_address']) OR empty($_POST['term_address'])) { $errors1['term_address'] = "Please enter your term address"; } } } if (!checkPostcode($_POST['term_pcode'])) { $errors1['term_pcode'] = "Please enter a valid term postcode"; } if (!checkUKTelephone($_POST['home_phone'], &$intError, &$strError)) { $errors1['home_phone'] = $strError; } if (!checkUKTelephone($_POST['mob_phone'], &$intError, &$strError)) { $errors1['mob_phone'] = $strError; } if (!checkEmail($_POST['email'])) { $errors1['email'] = "Please enter a valid email address"; } if (!isset($_POST['nationality']) OR empty($_POST['nationality'])) { $errors1['nationality'] = "Please select your nationality"; } if (!isset($_POST['dobDay']) OR empty($_POST['dobDay'])) { $errors1['dobDay'] = "Please select the day of your Date of Birth"; } if (!isset($_POST['dobMonth']) OR empty($_POST['dobMonth'])) { $errors1['dobMonth'] = "Please select the month of your Date of Birth"; } if (!isset($_POST['dobYear']) OR empty($_POST['dobYear'])) { $errors1['dobYear'] = "Please enter the year of your Date of Birth"; } if (!isset($_POST['objective']) OR empty($_POST['objective'])) { $errors1['objective'] = "Please state your objective"; } if (!isset($_POST['preference']) OR empty($_POST['preference'])) { $errors1['preference'] = "Please state your preference"; } if (!isset($_POST['skills_gen'])) { $errors1['skills_gen'] = "Please select how many general skills to include"; } if (!isset($_POST['skills_comms'])) { $errors1['skills_comms'] = "Please select how many communication skills to include"; } if (!isset($_POST['skills_team'])) { $errors1['skills_team'] = "Please select how many teamwork skills to include"; } if (!isset($_POST['skills_prob'])) { $errors1['skills_prob'] = "Please select how many problem solving skills to include"; } if (!isset($_POST['skills_comp'])) { $errors1['skills_comp'] = "Please select how many computing skills to include"; } if($_FILES['photograph']['size'] > $_POST['MAX_FILE_SIZE']) { $errors1['photograph'] = "Your photograph must be less than 80 kB in size"; } if($_FILES['photograph']['type'] != 'image/jpeg') { $errors1['photograph'] = "Your photograph be a jpg"; } return $errors1; } function validateForm2() { $errors2 = array(); for ($x = 1; $x <= $_POST['sgen[]']; $x++) { if (!isset($_POST['sgen']) OR empty($_POST['sgen'])) { $errors2['sgen'] = "Please fill in box number $x of general skills"; } } for ($x = 1; $x <= $_POST['scomms[]']; $x++) { if (!isset($_POST['scomms']) OR empty($_POST['scomms'])) { $errors2['scomms'] = "Please fill in box number $x of communication skills"; } } for ($x = 1; $x <= $_POST['steam[]']; $x++) { if (!isset($_POST['steam']) OR empty($_POST['steam'])) { $errors2['steam'] = "Please fill in box number $x of teamwork skills"; } } for ($x = 1; $x <= $_POST['sprob[]']; $x++) { if (!isset($_POST['sprob']) OR empty($_POST['sprob'])) { $errors2['sprob'] = "Please fill in box number $x of problem solving skills"; } } for ($x = 1; $x <= $_POST['scomp[]']; $x++) { if (!isset($_POST['scomp']) OR empty($_POST['scomp'])) { $errors2['scomp'] = "Please fill in box number $x of computing skills"; } } return $errors2; } function printErrors2($errors2) { echo "
";
foreach ($errors2 as $error)
{
echo "
";
foreach ($errors1 as $error)
{
echo "