PHP scripts must be located in htdocs The file extension is .php Code is protected by A field entitled "something" produces a variable "$something" that contains the value brought in by the field (this is the CGI convention, e.g., in Perl with CGI.pm we would have said that a field entitled "something" can have its value accessed through the following sequence: use CGI; $q = new CGI; $something = $q->param('something'); In PHP we get this without any effort.) So we start from this combination of files (in htdocs/0218): UW PICO(tm) 4.10 File: form.html
Name:
Age:

Press to move on.

UW PICO(tm) 4.10 File: one.php Well you will be years old next year. And we can combine the two: UW PICO(tm) 4.10 File: one.php Well you will be years old next year.

Please use the form below to enter and submit your data.

Name:
Age:

Press to move on.

And we have two examples: 1. Simple counter with two buttons state client side hidden fields. UW PICO(tm) 4.10 File: two.php

You have pushed the buttons in this form times thus far.

2. Same program with server-side state:

You have pushed the buttons in this form times thus far.

The session is in: -bash-3.2$ cd apache/ -bash-3.2$ cd phpsessions/ -bash-3.2$ ls -bash-3.2$ ls -l total 8 -rw------- 1 dgerman faculty 22 Feb 18 12:28 sess_04afcc6d592c96e51c378cf785876648 -bash-3.2$ cat sess_04afcc6d592c96e51c378cf785876648 times|i:3;balance|i:2;-bash-3.2$ cat sess_04afcc6d592c96e51c378cf785876648 times|i:7;balance|i:-2;-bash-3.2$