dynamic web pages ch 8 v1.0
DESCRIPTION
TRANSCRIPT
![Page 1: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/1.jpg)
1
Chapter 8Chapter 8Chapter 8Chapter 8
Dynamic searchingDynamic searching
![Page 2: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/2.jpg)
2
Creating a search.• In this chapter you are going to
create sql statements that search for information.
• The next slides show the changes to the tours.php page, tours_details.php page and index.php page
![Page 3: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/3.jpg)
3
tours.php
![Page 4: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/4.jpg)
4
tours_details.php
![Page 5: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/5.jpg)
5
index.php
![Page 6: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/6.jpg)
6
Preparing the search page.
• Make the changes to the tours.php page as shown on the next page.
![Page 7: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/7.jpg)
7
tours.php page1.Change text
2. Insert table
A recordset shown on next page.
A form with the following details
Link to tourprice.php
Recordset for the dynamic list values.
![Page 8: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/8.jpg)
8
Creating the recordsets -1.
![Page 9: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/9.jpg)
9
Creating the recordsets -2.
![Page 10: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/10.jpg)
10
Dynamic list
![Page 11: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/11.jpg)
11
Creating the repeating section
![Page 12: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/12.jpg)
12
Region Link
The filtering on the link would work until we change the query on the tour_details.php page which is done later.
![Page 13: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/13.jpg)
13
Now fix the index.php
A recordset and a repeat region. This is the same as the world region recordset in the tours.php page.
Profiles.php link
Contact.php link.
![Page 14: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/14.jpg)
14
tours_details.php page
Link to toursprice.php shown on the next page
Recordset shown on the following slides
Insert a table
Image shown on the following pages
h2
h1
![Page 15: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/15.jpg)
15
Tour price calculator link
![Page 16: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/16.jpg)
16
Tour details recordset
![Page 17: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/17.jpg)
17
Image details
![Page 18: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/18.jpg)
18
Adding a recordset navigation
• Add a recordset navigation to the bottom of the tours_details.php page as shown.
• Add the find Tours link to tours.php page
![Page 19: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/19.jpg)
19
Looking at the codeAdd this code to tours_details.php
When you select view all countries from the tours.php page this is the recordset you what to use.
When you click on the region link this is the recordset to use
If you select a country from the tours.php page then this is the recordset to use.
![Page 20: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/20.jpg)
20
Adding an if in case there are no records
Add these lines
![Page 21: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/21.jpg)
21
Lab 8 Overview• In this lab you will:
– Create a search interface by creating a form and allowing the user to select a value from a list/menu object and returning the tours that match the selected value.
• Objectives:– Group data in a select statement– Create a search page from a form– Implement a search results page using the
value the user selected on the form.– Add conditional logic to the SQL statement.
![Page 22: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/22.jpg)
22
You will create this page
Searchreservations.php
![Page 23: Dynamic Web Pages Ch 8 V1.0](https://reader036.vdocuments.net/reader036/viewer/2022081414/54bb626d4a7959a2108b4592/html5/thumbnails/23.jpg)
23
Receiving data from searchreservations.php
bookedtours,.php