prepare( "INSERT INTO videos (user_id, title, description, video_url, creator, upload_date) VALUES (?, ?, ?, ?, ?, ?)" ); // Using session user_id and current date $stmt->execute([$_SESSION['user_id'], $title, $description, $video_url, $creator, date('Y-m-d')]); header("Location: admin.php"); exit; } catch (PDOException $e) { $error_message = 'Database error: ' . $e->getMessage(); } } } ?> Add Video | MyTube Admin

Add New Video

Please provide a direct link to the video (e.g., a YouTube embed link).
Cancel