Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Week 7 Activity 2 Modify the getMovieList.php file and include links to display different types of movies: MORE INFO ON THE NEXT PAGE Each link should display a list of movies identified by that link....

1 answer below »
Week 7 Activity 2
Modify the getMovieList.php file and include links to display different types of movies:
MORE INFO ON THE NEXT PAGE
Each link should display a list of movies identified by that link. For example, your code
should display an output similar to the following when the Musical Movies link is clicked:
_______________________________________________________________
How to Submit back to me
Submit the edited getMovieList.php file back to me.



XXXXXXXXXXDrama Movies
XXXXXXXXXXAdventure Movies
XXXXXXXXXXAction Movies
$movieGenre);

Obtain data
$movieList = getAll($sql, $db, $parameterValues);


Use a table structure for displaying data
XXXXXXXXXXecho "List of {$movieGenre} Movies";
XXXXXXXXXXecho "
    Title    Genre
";

XXXXXXXXXXforeach( $movieList as $movie){
/* Each $movie is an associative a
ay. Keys are the same as the field names
XXXXXXXXXXused in the SQL statement: title and type. *
XXXXXXXXXXecho "    {$movie['title']}    {$movie['type']}
";
}
XXXXXXXXXXecho "";

} catch (PDOException $e) {
XXXXXXXXXXecho "E
or!: ". $e->getMessage() . "
";
XXXXXXXXXXdie();
}
}
?

prepare($sql) method returns an object.
*
$statement = $db->prepare($sql);
/* Execute prepared statement. The execute( ) method returns a resource object. *
$statement->execute($parameterValues );
/* Use the fetchAll( ) method to extract records from the result set.
*
$result = $statement->fetchAll(PDO::FETCH_ASSOC);

return $result;
}
?>
Answered 3 days After Oct 07, 2021

Solution

Ketaki answered on Oct 08 2021
131 Votes
$servername = "localhost";
$username = "root";
$password = "";
$dbname="moviedb";

Create connection

$conn = mysqli_connect($servername, $username, $password);
    try
    {
        $dbh = new...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here