$ cd www
$ mkdir ex6
$ cd ex6
Create the following three scripts in the ex6 directory.
<?php_track_vars?>
<?
echo "Values submitted via POST method:<br>";
/* reset() rewinds the given array's internal ptr to first elem */
reset($HTTP_POST_VARS);
/* list() - isn't really a function, assigns a list of
vars in one operation, in this case each returns a
key, value pair which list is assigning to $key and
$val */
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
echo "$key => $val <br>";
}
?>
Create an HTML form called formtest.html using at least 2 different input types. Here is a start on the form.
<HTML> <HEAD> <TITLE>The Life Cycle Applet</TITLE> </HEAD> <BODY> <FORM ACTION="formtest.php3" METHOD="POST" > </FORM> </BODY> </HTML>
This is due in class on Thursday. It needs to be turned into your www directory in a seperate directory named ex6 or exercise6.