<?php

include('../../../config/config.php');

$emma_collect_campus = $_POST['emma_get_campus'];


$emma_campus_table_select = "SELECT * FROM `campus` WHERE `CampusID` = '$emma_collect_campus' ";
$emma_campus_table_query = mysqli_query($link, $emma_campus_table_select);
$emma_campus_table_fetch = mysqli_fetch_assoc($emma_campus_table_query);
$emma_campus_table_rows = mysqli_num_rows($emma_campus_table_query);

    if($emma_campus_table_rows > 0){

       $emma_institution = $emma_campus_table_fetch['InstitutionID'];

       echo '<input type="hidden" class="emmaloadinputforinstitutionorcampus" value="'.$emma_institution.'">';
       
    }else{
        echo 2;
    }

?>