$posId1 = $position_rec[$x]['posID'];
                $posId2 = $candidate_rec[$y]['id'];
                if ($posId1 == $posId2) {
                    $pdf->SetFont('Times', 'I', 9);
                    $pdf->Ln();
                    $pdf->Cell(40, 5, ' ' . $candidate_rec[$y]['lname'] . ', ' . $candidate_rec[$y]['fname']);
                }
            }
        }
    } else {
        $pdf->Ln();
    }
    $pdf->Ln();
}
$voterDtl = new Voter();
$name = $voterDtl->searchVoter($votID1);
$courseDtl = new Course();
$course = $courseDtl->getVotersCourse($votID1);
$program = new Program();
$progName = $program->getStudentProgram($votID1);
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Times', '', 10);
$pdf->MultiCell(0, 5, '---------------------------Voters Information---------------------------', 0, 'C');
$pdf->Cell(10, 5, 'ID No.  ' . $votID1);
$pdf->Ln();
$pdf->Cell(10, 5, 'Name  ' . $name[0]['vot_lname'] . ', ' . $name[0]['vot_fname']);
$pdf->Ln();
$pdf->Cell(10, 5, 'Course  ' . $course[0]['course']);
<?php

require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsPosition.php";
require_once "../libraries/classes/clsVoter.php";
$position = new Position();
$positionDtl = $position->getPosition(2);
$voter = new Voter();
$name = $voter->searchVoter($_GET["id"]);
?>

<form action="../inc/addCandidate.php" method="post">
    
    <?php 
echo $name[0]['vot_lname'] . ', ' . $name[0]['vot_fname'];
?>
    <select name="position">
        <option value="">Select position</option>
        <?php 
for ($ctr = 0; $ctr < count($positionDtl); $ctr++) {
    echo '<option value="' . $positionDtl[$ctr]["posID"] . '">' . $positionDtl[$ctr]["posName"] . "</option>";
}
?>
    </select>
    <input type="submit" value="Add Program Candidate">     
</form>
<?php

header("Location: ../accounts/index.php");
session_start();
require_once "../libraries/classes/config.php";
require_once "../libraries/classes/clsVoter.php";
if (isset($_POST['vot_id'])) {
    $voter = new Voter();
    $_SESSION["voter"] = $voter->searchVoter($_POST['vot_id']);
}