= 1) { $userId = $_GET["u"]; $correctFavorites = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/users/" . $_GET["u"] . "-favorites.json"), true); } else { header("Location: favorites.php?u=" . $_PROFILE["id"]); die(); } } else { header("Location: favorites.php?u=" . $_PROFILE["id"]); die(); } } else { $userId = $_PROFILE["id"]; } foreach ($correctFavorites as $id) { if (isset($songs[$id])) $list[$id] = $songs[$id]; } unset($_GET["a"]); require_once "listing.php";