Dynamic Web Pages Ch 6 V1.0

745 views

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
745
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
31
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Dynamic Web Pages Ch 6 V1.0

  1. 1. Chapter 6 Filtering & Displaying Data
  2. 2. Overview <ul><li>In this chapter you will: </li></ul><ul><ul><li>Transfer dynamic data through the URL. </li></ul></ul><ul><ul><li>Add repeating regions. </li></ul></ul><ul><ul><li>Creating recordsets with information from the URL. </li></ul></ul><ul><ul><li>Adding images dynamically. </li></ul></ul>
  3. 3. Changing profiles.php <ul><li>The profiles page displays the countries statically. </li></ul><ul><li>We are going to change this to dynamically from the database. </li></ul>Profiles current page
  4. 4. Profiles_details.php <ul><li>Create a profiles_details.php page from the generic template. </li></ul>
  5. 5. profiles.php - 1 <ul><li>Delete the countries so the profiles.php page is as shown. </li></ul>
  6. 6. profiles.php - 2 <ul><li>Create a recordset as shown. </li></ul>
  7. 7. profiles.php - 3 <ul><li>Insert a country name field binding, as shown. </li></ul><ul><li>With this insertion highlighted click on the browse icon for a link. </li></ul><ul><li>Filling the browse as shown. </li></ul><ul><li>Select the parameters button. </li></ul>
  8. 8. profiles.php – 4 <ul><li>In the parameters dialog box, click under the name column heading and type the names as shown. </li></ul><ul><li>Click on the lighting bolt and select as shown for both values. </li></ul><ul><li>This parameters button writes the url code in the link. </li></ul><ul><li>Here we are passing the country ID and name in the URL. </li></ul>
  9. 9. profiles.php – 5 <ul><li>Notice now the binding is a link. </li></ul><ul><li>Notice the link sends the id of the country in the URL. </li></ul><ul><li>With the link highlighted </li></ul><ul><ul><li>In the server behaviours </li></ul></ul><ul><ul><li>Panel click + and choose </li></ul></ul><ul><ul><li>Repeat Region, as shown. </li></ul></ul>
  10. 10. profiles.php – 6 <ul><li>Adding a repeat region and click on OK. </li></ul><ul><li>A section page of the page is shown. Check that the break is inside the repeat region </li></ul>
  11. 11. profiles.php – 5 <ul><li>View the page. It should look like </li></ul>
  12. 12. profiles_details.php <ul><li>Open the profiles_details.php </li></ul><ul><li>Create a recordset and complete the page to look like below. </li></ul><ul><li>The following slide have the details on how complete it. </li></ul>Heading 1 Heading 2 process_details.php
  13. 13. Create the recordest Click the advanced.. button.
  14. 14. Combining two tables <ul><li>Add the other table; region. </li></ul><ul><li>Add the where clause to join the tables. </li></ul>
  15. 15. Add Bindings & View <ul><li>Add the bindings as shown on the pervious slides. </li></ul><ul><li>The finished page should look like: </li></ul>
  16. 16. Inspecting the pervious sql <ul><li>Take a look at the Sql </li></ul><ul><li>What does it mean </li></ul>
  17. 17. Dynamic images -1 <ul><li>Now we are going to add the image that go with the country. </li></ul><ul><li>Place the cursor as shown. </li></ul><ul><li>From the menu select insert->image. </li></ul>
  18. 18. Dynamic images -2 <ul><li>Select as shown and click OK. </li></ul><ul><li>Create the imageright css rule and apply it to the image. </li></ul>
  19. 19. Dynamic images -4 <ul><li>Completed page. </li></ul>
  20. 20. Lab 6 -1 <ul><li>Dynamically creating a repeated region for the tour packages and their dates. </li></ul><ul><li>Then the tour ID is sent in the URL to open the tourpackages.php page. </li></ul><ul><li>The tourpackage.php page uses the tour ID to display the info about the selected tour package. </li></ul><ul><li>The following slides show the changes of the two pages. </li></ul>
  21. 21. Lab 6 -2 <ul><li>What the page look like now. </li></ul>tours.php
  22. 22. Lab 6 -3 <ul><li>What the page will look like at the end </li></ul>tours.php
  23. 23. Lab 6 -4 <ul><li>Current page </li></ul>tourpackages.php
  24. 24. Lab 6 -5 <ul><li>What the page will look like at the end </li></ul>tourpackages.php

×