1. Introducing PHP
Activity 1.1: Displaying Query Strings in the Browser
Solution
- Create a file named
movies.php
. - Capture query string data in the file to store the details of the movies, such as the name, the actors, and the release years:
<?php $name = $_GET['movieName']; $star = $_GET['movieStar']; $year = $_GET['movieYear']; ?>
- Create a basic HTML structure and then display the captured query strings:
movies.php
8Â Â Â Â Â Â <head> 9Â Â Â Â Â Â Â Â Â Â <meta charset="UTF-8"> 10Â Â Â Â Â Â Â Â Â <meta name="viewport" content="width=device-width, initial-scale=1.0"> 11Â Â Â Â Â Â Â Â Â <meta http-equiv="X-UA-Compatible" content="ie=edge"> 12Â Â Â Â Â Â Â Â Â <title><?php echo ...