// If user updated the search form if (isset($_POST['update_checkboxes'])) { if (!empty($_POST['websites'])) { $jobs->update_websites_checkboxes($_POST['websites']); } else { $_SESSION['websites'] = $jobs->create_website_checkboxes(); } if (!empty($_POST['job_types'])) { $jobs->update_job_types_checkboxes($_POST['job_types']); } else { $_SESSION['job_types'] = $jobs->create_job_types_checkboxes(); } if (!empty($_POST['categories'])) { $jobs->update_categories_checkboxes($_POST['categories']); } else { $_SESSION['categories'] = $jobs->create_categories_checkboxes(); } } // Creates list of websites checks if doesnt exist if (!isset($_SESSION['websites'])) { $_SESSION['websites'] = $jobs->create_website_checkboxes(); } // Creates list of job types checks if doesnt exist if (!isset($_SESSION['job_types'])) { $_SESSION['job_types'] = $jobs->create_job_types_checkboxes(); } // Creates list of job-categories checks if doesnt exist if (!isset($_SESSION['categories'])) { $_SESSION['categories'] = $jobs->create_categories_checkboxes(); } // Those functions will make an array with all the job types categories and websites