285
CHAPTER
Creating Dynamic Pages 12
Does it matter what method I use on the form?
Yes. The $_POST super-global reads form variables
only if the method is set to post. You can use the
$_GET super-global to read variables from a form
that uses get. A third super-global, $_REQUEST,
exists that can read form values from either method,
but using it is not recommended.
What does the dollar sign represent?
PHP uses the dollar sign as the first character of
any variable name. Because the super-globals are
variables, they begin with the dollar sign. Variables
you create yourself, as is shown in upcoming tasks,
also begin with the symbol.
● The resulting PHP page
appears, showing the values
from the form.
0 Save the page in the Web
server’s root folder, using the
filename you noted in Step 3.
! In your Web browser, open
the HTML document from
Step 1.
@ Fill in the form fields and
then click the button.
11
12
TIPS