<?php
if (session_status() === PHP_SESSION_NONE) session_start();
$id = isset($_GET['id']) ? (int)$_GET['id'] : 0;
if ($id > 0) {
  if (!isset($_SESSION['wishlist'])) $_SESSION['wishlist'] = [];
  $_SESSION['wishlist'][$id] = true;
}
header('Location: /WATCHING/pages/wishlist.php');