<?php

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

$emma_get_camp = $_POST['emmasendcampus'];

$emma_select_for_camp = "SELECT * FROM `campus` WHERE `CampusID` = '$emma_get_camp' ";
$emma_select_for_camp_query = mysqli_query($link, $emma_select_for_camp);
$emma_select_for_camp_fetch = mysqli_fetch_assoc($emma_select_for_camp_query);
$emma_select_for_camp_rows = mysqli_num_rows($emma_select_for_camp_query);

if($emma_select_for_camp_rows > 0){
    
    $emma_get_institution = $emma_select_for_camp_fetch['InstitutionID'];

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

?>