<input type="text" class="form-control" id="name" name="name" placeholder="Enter name"> </div> <div class="form-group"> <label for="username">Username</label> <input type="text" class="form-control" id="username" name="username" placeholder="Enter username"> </div> <div class="form-group"> <label for="building">Building</label> <select class="form-control" id="building" name="building"> <option value="N/A">N/A</option> <?php $parents = Building::GetUniqueParents(); foreach ($parents as $parent) { $children = Building::GetChildren($parent); echo "<optgroup label=\"" . $parent . "\">"; for ($i = 0; $i < count($children); $i++) { echo "<option>" . $children[$i]->GetChild() . "</option>"; } echo "</optgroup>"; } ?> </select> </div> <div class="form-group"> <label for="location">Location (Room Number)</label> <input type="text" class="form-control" id="location" name="location" placeholder="Enter location"> </div>