<?php
	$conn = mysqli_connect('localhost','menahrs_oxy','OxyApp@2023');
                mysqli_select_db($conn,'menahrs_oxy');

    $jobid = $_POST['jobid'];

    $query = mysqli_query($conn, "SELECT * FROM joborder where joborder_id = '$jobid'");
    while($row = mysqli_fetch_array($query))
    {
    	$jobTitle = $row['title'];
    	$SecondQuery = mysqli_query($conn, "SELECT * FROM jd WHERE title = '$jobTitle'");
    	while($secondRow = mysqli_fetch_array($SecondQuery)){
    		echo '<a href="'.$secondRow['jd_attachment'].'" target="_blank"><p class="font-custom-p">Download Job Description<p></a>';
    	}
    }
?>