<?php
    session_start();
	if ( empty($_SESSION['login']) ) {
        header( 'Location: login.php' );
        die;
	}

    include 'include/database.php';

    $connection = connect($database);

    //$canEdit = canEditValues($connection, $_SESSION['login']);
    
    $campuses = getCampusNamesCG($connection);

	$connection = null;
    
    $campus_options = '';
    
    foreach ($campuses as $campus) {
        $campus_options .= "
            <option value=\"{$campus['name']}\">{$campus['name']}</option>
        ";
    }
    
    echo $campus_options;
?>