prepare( "UPDATE videos SET title = ?, description = ?, video_url = ?, creator = ? WHERE id = ?" ); $stmt->execute([$title, $description, $video_url, $creator, $video_id]); header("Location: admin.php"); exit; } catch (PDOException $e) { $error_message = 'Database error: ' . $e->getMessage(); } } } // Fetch existing video data $stmt = $pdo->prepare("SELECT * FROM videos WHERE id = ?"); $stmt->execute([$video_id]); $video = $stmt->fetch(); if (!$video) { header("Location: admin.php"); exit; } ?> Edit Video | MyTube Admin

Edit Video

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