prepare( "INSERT INTO videos (user_id, title, description, video_url, creator, upload_date, status) VALUES (?, ?, ?, ?, ?, ?, 'pending')" ); $stmt->execute([ $_SESSION['user_id'], $title, $description, $video_url, $_SESSION['username'], date('Y-m-d') ]); header("Location: index.php?upload=success"); exit; } catch (PDOException $e) { $error_message = 'An error occurred while uploading your video. Please try again later.'; error_log('Upload failed: ' . $e->getMessage()); } } } ?>
Your video will be submitted for approval and will not be public until an admin reviews it.