Example #1
0
function applyForJob()
{
    include_once "../model/User.php";
    $user = new User();
    $job_id = $_REQUEST['job_id'];
    if (!$user->applyForJob($job_id)) {
        echo '{"result": 0, "message": "You application failed"}';
        return;
    }
    echo '{"result": 1, "message": "You have successfully applied for this job"}';
    return;
}