<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="css/960_16_col.css">
        <link rel="stylesheet" href="css/pageStyle.css">
        <link rel="stylesheet" href="css/bootstrap.css">
    </head>
    <body>
        <?php 
try {
    ini_set("display_errors", 1);
    $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password);
    // gets the user id and searches for a matching id in the member table and displays the user's details
    $sTable = new seekerTable($connection);
    $aTable = new applicationTable($connection);
    $jTable = new jobsTable($connection);
    $id = $_SESSION['id'];
    $applicants = $aTable->showAll();
    $duplicate = false;
    $saveNum = $_GET['saveNum'];
    $count = $saveNum;
    $limit = $count + 10;
    $loopPass = 0;
    $previousSaveNum = $saveNum - 10;
    $seekers = $sTable->showAll();
    $jobs = $jTable->showAll();
} catch (PODException $e) {
    $connection = null;
    exit("Connection Failed: " . $e->getMessage());
}
        <link rel="stylesheet" href="css/960_16_col.css">
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/ApplicationStyle.css">
        <script src="js/ajaxNotificationRequest.js"></script>

    </head>
    <!-- ajaxFunction function called once the body loads -->
    <body onload="ajaxFunction()">
        <?php 
try {
    ini_set("display_errors", 1);
    //establish a connection
    $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password);
    //instantiate a new employer,seeker,job and application table, passing the connection details as a parameter
    $table = new employerTable($connection);
    $applicationTable = new applicationTable($connection);
    $seekerTable = new seekerTable($connection);
    $jobsTable = new jobsTable($connection);
    //id variable will store the employer id stored in the session
    $id = $_SESSION['id'];
    //find the current employer in the database - store in the employer object
    $employer = $table->findById($id);
    //store all the employers in the
    //$employers = $table->showAll();
    //store all jobs
    $jobs = $jobsTable->showAll();
    //store all applications
    $applications = $applicationTable->showAll();
    //store all seekers
    $seekers = $seekerTable->showAll();
    //variables used to store the current employer's information
<?php

session_start();
if (!$_SESSION['seeker']) {
    header("location: login.php");
}
require_once 'DB.php';
require_once 'application.php';
require_once 'applicationTable.php';
require_once 'jobsTable.php';
require_once 'job.php';
$jId = $_POST['jId'];
$empId = $_POST['empId'];
$sId = $_SESSION['id'];
$status = 1;
try {
    ini_set("display_errors", 1);
    $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password);
    $table = new applicationTable($connection);
    $application = new application(-1, $sId, $empId, $jId, $status);
    $id = $table->addApplicant($application);
    $application->setId($id);
    header("Location: sControlPanel.php");
} catch (PDOException $e) {
    $connection = null;
    exit("Connection failed: " . $e->getMessage());
}
<?php

//start session.
session_start();
//if the session is not the specified employer session created at login - the user
//will be redirected to the login page.
if (!$_SESSION['employer']) {
    header("location: login.php");
}
//require the necessary classes
require_once 'DB.php';
require_once 'applicationTable.php';
//store the id value passed through the GET method.
$applicantId = $_GET['id'];
try {
    ini_set("display_errors", 1);
    $connection = DB::getConnection(DB::host, DB::database, DB::user, DB::password);
    //instantiate a new applicationTable - passing in the connection as the parameters.
    $table = new applicationTable($connection);
    //execute the deleteApplicant method passing the stored applicant id as a parameter.
    $table->deleteApplicant($applicantId);
    //redirect the user back to the viewApplicants page.
    header("Location: viewApplicants.php?saveNum=0");
} catch (PDOException $e) {
    //if a problem occurs, close the connection.
    $connection = null;
    exit("Connection failed: " . $e->getMessage());
}