<?php require_once '../connection.php'; require_once '../model/movies.php'; $imdb_id = $_GET['id']; $conn = getConnection(); $movieModel = new Movies($conn); $matches = $movieModel->findByMovieId($imdb_id); if (count($matches) == 1) { $url = "http://www.omdbapi.com/?i={$imdb_id}&tomatoes=true"; $json = file_get_contents($url); $movieData = json_decode($json); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta charset="UTF-8"> <link rel="icon" href="img/page-icon.png"> <title>2014 Movie Revenues</title> <!-- bootstrap css --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> </head> <body class="container text-center"> <?php foreach ($matches as $match) {