| Home | About Us | FAQ | Contact Us |
if (isset($_GET['job_id']) && is_numeric($_GET['job_id'])) { $job_id = (int) $_GET['job_id']; $stmt = $conn->prepare(" SELECT description FROM phpjob_jobs WHERE jobid = ? LIMIT 1 "); if (!$stmt) { die('Prepare failed: ' . $conn->error); } $stmt->bind_param("i", $job_id); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $description = strip_tags($row['description']); $description = html_entity_decode($description, ENT_QUOTES | ENT_HTML5, 'UTF-8'); $description = preg_replace('/\s+/', ' ', $description); $description = trim($description); if (mb_strlen($description) > 155) { $cut = mb_substr($description, 0, 152); $cut = mb_substr($cut, 0, mb_strrpos($cut, ' ')); $meta_description = $cut . '...'; } else { $meta_description = $description; } } } ?>