function listCities($cityIDsToRankAvail) { foreach ($cityIDsToRankAvail as $cityID => $rankAvail) { $cityName = getCityNameFromCityID($cityID); ?> <form action='choosemission.php' method='post'> <input type='hidden' name='postedCityID' value='<?php echo $cityID; ?> ' /> <input type='submit' value='Missions in <?php echo ucfirst($cityName); ?> ' /> </form> <?php } }
function showJustUnlockedCityRank() { $justUnlockedCityRank = $_SESSION['justUnlockedThisCityRank']; $html = '<h6>Congrats! You Ranked Up!</h6> <p class="masteredinfo"> You have mastered all of the Rank ' . ($justUnlockedCityRank - 1) . ' "' . getCityNameFromCityID($_SESSION['currentMissionCity']) . '" missions</p> '; unset($_SESSION['justUnlockedThisCityRank']); return $html; }