Dynamic Web Pages Ch 8 V1.0
-
Upload
cathie101 -
Category
Technology
-
view
500 -
download
0
description
Transcript of Dynamic Web Pages Ch 8 V1.0
1
Chapter 8Chapter 8Chapter 8Chapter 8
Dynamic searchingDynamic searching
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
3
tours.php
4
tours_details.php
5
index.php
6
Preparing the search page.
• Make the changes to the tours.php page as shown on the next page.
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.
8
Creating the recordsets -1.
9
Creating the recordsets -2.
10
Dynamic list
11
Creating the repeating section
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.
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.
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
15
Tour price calculator link
16
Tour details recordset
17
Image details
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
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.
20
Adding an if in case there are no records
Add these lines
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.
22
You will create this page
Searchreservations.php
23
Receiving data from searchreservations.php
bookedtours,.php