= 5) { $_SESSION['error'] = "You have reached your daily limit of 5 job postings."; header("Location: manage-jobs.php"); exit; } $title = $_POST['title']; $cat_id = $_POST['category']; $location = $_POST['location']; $type = $_POST['job_type']; $salary = $_POST['salary']; $experience = $_POST['experience']; $closing_date = $_POST['closing_date']; $description = $_POST['description']; // Handle Job Image Upload $job_image = ""; if (!empty($_FILES['job_image']['name'])) { $uploaded = uploadImage($_FILES['job_image'], 'uploads/jobs/'); if ($uploaded) { $job_image = $uploaded; } } $sql = "INSERT INTO jobs (employer_id, category_id, title, description, job_image, location, job_type, salary_range, experience_required, closing_date, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'active')"; if (query($sql, [$emp_id, $cat_id, $title, $description, $job_image, $location, $type, $salary, $experience, $closing_date])) { $_SESSION['success'] = "Job posted successfully and is now live!"; header("Location: manage-jobs.php"); exit; } } $page_title = "Post a New Job"; ?> <?php echo $page_title; ?> | jobly.lk

Post a New Job Opening

Upload an advertisement poster or image for this job.
Cancel