2021 - Filmhit Movie Movie.php
// Helper: Convert cast string to array $castArray = explode(',', $movie['cast']); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php echo htmlspecialchars($movie['title']); ?> | FilmHit Blockbuster</title> <meta name="description" content="<?php echo htmlspecialchars($movie['tagline']); ?> - <?php echo htmlspecialchars(substr($movie['synopsis'], 0, 150)); ?>"> <style> * margin: 0; padding: 0; box-sizing: border-box;
.book-btn:hover background: #ff0a1a; transform: scale(1.05); filmhit movie movie.php
CREATE TABLE movies ( id INT AUTO_INCREMENT PRIMARY KEY, title VARCHAR(255) NOT NULL, slug VARCHAR(255) UNIQUE NOT NULL, tagline VARCHAR(255), synopsis TEXT, release_year INT, duration INT, -- in minutes director VARCHAR(255), cast TEXT, -- comma-separated names poster_url VARCHAR(500), trailer_url VARCHAR(500), -- YouTube embed ID or URL rating FLOAT DEFAULT 0, -- average rating (e.g., 8.5) is_filmhit BOOLEAN DEFAULT 0 ); -- Insert a sample FilmHit movie INSERT INTO movies (title, slug, tagline, synopsis, release_year, duration, director, cast, poster_url, trailer_url, rating, is_filmhit) VALUES ('Galactic Wars: The Uprising', 'galactic-wars-uprising', 'The galaxy needs a hero.', 'In a distant galaxy, a young rebel discovers a hidden power that could overthrow an evil empire. With epic space battles and emotional depth, this is the blockbuster event of the year.', 2025, 148, 'Alex M. Knight', 'John Carter, Jane Dane, Zara Moon, Viktor Strong', 'https://image.tmdb.org/t/p/w500/example.jpg', 'dQw4w9WgXcQ', 8.7, 1); <?php // Database connection $host = 'localhost'; $dbname = 'your_database'; $username = 'root'; $password = ''; try $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); catch(PDOException $e) die("Database connection failed: " . $e->getMessage()); // Helper: Convert cast string to array $castArray
/* Responsive */ @media (max-width: 768px) h1 font-size: 2rem; .movie-hero padding: 20px; .poster flex-basis: 180px; </style> </head> <body> .movie-hero padding: 20px
/* Trailer Section */ .trailer-section margin: 50px 0;
.filmhit-badge background: gold; color: #000; display: inline-block; padding: 5px 12px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; margin-bottom: 15px; text-transform: uppercase;