Currently it is displaying “array” where the title of the movie should be going.
include ('../BrewCity/Includes/brewheader.php');
require_once ('Brew_City_Connect.php');
$member_id= $_SESSION['member_id'];
$movie_id=$_GET['movie_id'];
$title = ['title'];
$query = "SELECT title FROM New_Movie_Entry WHERE movie_id='$movie_id' limit 1";
$result = mysqli_query ($dbc, $query);
$query = "INSERT INTO Rented_Movies (member_id, movie_id, title)
VALUES ('$member_id', '$movie_id', '$title')";
$result = mysqli_query ($dbc, $query);
if ($result) {
echo "<p> You have rented a new ".$title;"! </p>";
echo "<p> Please click here to return to homepage. <a href=https://tytplumb.uwmsois.com/BrewCity/BREW%20CITY%20RENTALS> Here </a>";
exit();
} else {