Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

Listing 1.4 is a standard HTML form. If you have dealt at all with CGIs, it will look
familiar. There are three form fields that match up with the variables from our previous
example. Instead of simply putting data into the variables, we will provide a form and use
the information the user types. When the user presses the submit button, the script named
in the ACTION attribute will receive the three form fields and PHP will convert them into
variables.


Listing 1.5 Computing the Cost of Lunch from a Form print

Free download pdf