<?php
$sql = "SELECT * FROM members WHERE Campus='$my_campus'";
    if($result = $db->query($sql)){
        if($result->num_rows > 0){
            while($row = $result->fetch_array()){
                $id = $row['ID'];
            }
        }
    }
            
?>