Refactored showlocation.php