/////////////////////////////////////////////Task 2 ///////////////////////////////////////// //The Show_Form function produces output based on input received function Show_Form(){ //using func_ methods Get all the arguments send to the function $vars = func_get_args(); $count = func_num_args(); echo '
'; echo ' '; echo ''; echo "


"; } $ShowForms = False; //check if post have happend else show the form. if (isset($_POST['Province'])){ if ($_POST['Province'] == 'Select a province') { Echo 'Please select a province from the drop-down list.'; $ShowForms = True; } else { Echo 'You have selected "'. $_POST['Province'] .'".'; } } else { $ShowForms = True; } //call the Show_Form function with all the parameters needed for the selects. if ($ShowForms == True) { /////////////////////////////////////////////Task 2 A ///////////////////////////////////////// echo '

Task2: A) Two Eastern Cape options


'; Show_Form('task2.php','POST','Select a province','Gauteng','Western Cape', 'Eastern Cape','Northern Cape','Free State','Limpopo', 'North West','KwaZulu Natal','Eastern Cape'); /////////////////////////////////////////////Task 2 B ///////////////////////////////////////// echo '

Task2: B) One Eastern Cape option


'; Show_Form('task2.php','POST','Select a province','Gauteng','Western Cape', 'Eastern Cape','Northern Cape','Free State','Limpopo', 'North West','KwaZulu Natal'); }