connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Fetch video links from the database
$sql = "SELECT videoLink, linkfrom FROM your_table";
$result = $conn->query($sql);
// Generate HTML content for each video
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
// Generate HTML code for video based on link source (e.g., Facebook, Instagram, YouTube)
$videoLink = $row["videoLink"];
$linkfrom = $row["linkfrom"];
$thumbnailUrl = ''; // Set thumbnail URL based on video source (Facebook, Instagram, YouTube, etc.)
$title = ''; // Set video title
// Modify HTML code based on the video source and data retrieved from the database
switch($linkfrom) {
case "Facebook":
// Generate HTML code for Facebook video
// Implement logic to fetch Facebook video thumbnail and title
break;
case "Instagram":
// Generate HTML code for Instagram video
// Implement logic to fetch Instagram video thumbnail and title
break;
case "YouTube":
// Generate HTML code for YouTube video
// Implement logic to fetch YouTube video thumbnail and title
break;
// Add more cases for other video sources if needed
}
// Echo HTML code for the video
echo '