Home
Logout
Login
Alien
2 hours
Rating 10/10 ⭐
Information about the movie
Genre:
Sci-Fi / Horror
Actors:
Sigourney Weaver, Tom Skerritt
Comments
Post Comment
prepare($sql)) { $stmt->bind_param("i", $movie_id); $stmt->execute(); $stmt->bind_result($username, $comment, $created_at); while ($stmt->fetch()) { echo "
$username
($created_at):
$comment
"; } $stmt->close(); } // Handle the form submission (insert new comment) if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['comment']) && !empty($_SESSION['username'])) { $username = $_SESSION['username']; $comment = $_POST['comment']; $sql = "INSERT INTO comments (movie_id, username, comment) VALUES (?, ?, ?)"; if ($stmt = $link->prepare($sql)) { $stmt->bind_param("iss", $movie_id, $username, $comment); $stmt->execute(); $stmt->close(); } header("Location: " . $_SERVER['HTTP_REFERER']); exit(); } ?>
Comments
$comment