Tuesday, June 2, 2009

Exercise 9: Second Attempt

Well it is sometimes hard to see the wood from the trees.

It also helped when I read (Ince, p129-150) where he discusses Browsers and HTML. To date I have had little to no exposure to developing web pages. Thanks to this blog I am finally getting the hang of HTML.

So back to exercise 9. As it turns out my initial thoughts in Exercise 9: First attempt were correct. This is basically a rehash of what we did in exercises 6-8.

I was getting lost in the HTML on the entry form. Thanks to (Ince) I twigged to the fact that I needed to use the SUBMIT method on the form and the GET method in the php file to retrieve the information.

So here is the input form and the HTML to create it:

and the php file that parses the submitted data and outputs it.

As you can see from the output, to answer part 3 of exercise 9 yes I can modify the script to process the form.

Having just written that, the question poses another question. What does Ken mean in step 2 when he says list the steps involved in processing the form?

What steps did he have in mind? I can see that

  1. use the get method for each parsed parameter to retrieve the value.
  2. use the value to do something

Maybe his point is that it is a relatively trivial exercise to extract the information.

References Ince, D. (2006). Developing Distributed & E-commerce Applications: Prentice-Hall, Inc. Upper Saddle River, NJ, USA.

No comments:

Post a Comment