PHP Learners:

For Wednesday November 30

Read and follow directions through Chapter 3. For now you can skip the discussion of arrays and objects on pages 35 and 36.

Create a form that asks the user for their name and the name of their favorite Paly class. Send that data to a php script using the GET method. Have that script respond back using their name, and how proud you are that they like that class, using the name of the class.

If you need help with scripts, email me at pohara@pausd.org and vist the author's site at http://www.dmcinsights.com/phpvqs2/

For Wednesday December 14

Read and follow directions found in Chapter 4.

Create a form that asks a student how far he or she lives from Paly (in miles) and about how fast he/she walks (in miles per hour). Send that data to a PHP script using either the GET or POST method. In that script, calculate and provide back to the user, in an html document, the following values:

  • How long it takes the user to walk to school one way.
  • How much time (in hours) they spend, in a 180-day school year, walking to and from school. Of course this all assumes that the person walks to school every day.
  • Be sure to make your response user-friendly. That means address them by name. And tell them what the numbers mean

Bonus Assignment: Add to the above response some examples of how much time they would spend walking to school if they lived a randomly-generated number of miles from school.

An example response. I made up the numbers. They aren't correct.:

Hi Mary

You live 2 miles from paly and walk 5 miles per hour. You spend 24 minutes walking to school one way, and 140 hours per year.

If you lived 12 miles from Paly you would spend 810 hours per year. That's a lot of hours.

Be sure to upload your form and script to your folder on palywebdesign.org so I can see it.

 

BUSINESS ED HOME | PALY HOME PAGE