0) { $stmt = $conn->prepare("SELECT * FROM photo_albums WHERE album_id = ? AND user_id = ?"); $stmt->bind_param("ii", $album_id, $_SESSION['user_id']); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $album = $result->fetch_assoc(); } $stmt->close(); if (!$album) { $conn->close(); header('Location: gallery'); exit; } } $conn->close(); $pageTitle = $album ? 'Edit Album' : 'Create Album'; $breadcrumbs = [['Home' => 'index.php'], ['Gallery' => 'gallery']]; require_once($rootPath . '/components/banner.php'); ?>

Optional: Share details about when, where, or why you created this album
Current cover

Current cover image

No cover image yet
🖼️

Click to select cover image

Image will be used as album thumbnail. Recommended: Square image (500x500px or larger)

Photos in Album

📸

Drag and drop photos here or click to select

Supports JPG, PNG, GIF, WEBP. Max 5MB per image