Appendix

About

This section is included to assist the students to perform the activities present in the book. It includes detailed steps that are to be performed by the students to complete and achieve the objectives of the book.

1. Introducing PHP

Activity 1.1: Displaying Query Strings in the Browser

Solution

  1. Create a file named movies.php.
  2. 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'];

    ?>

  3. 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, ...

Get The PHP Workshop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.