Minute paper for today: by e-mail please, I would like to get an assessment of your web sites. So please check the What's Due? and grade your own website based on that; e-mail me the results (dgerman@indiana.edu) Topic for the day: server-side state with PHP. UW PICO(tm) 4.10 File: one.php
Name:

Age:

Press to move on.

Press to reset.

We discussed GET, POST also the action attribute:
Name:

Age:

Press to move on.

Press to reset.

two.php looks like this: UW PICO(tm) 4.10 File: two.php Hello, how are you ?

Are you really years old? Now I decide to write three.php which combines the above two files. UW PICO(tm) 4.10 File: three.php Hello, how are you ?

Are you really years old? Welcome.

Name:

Age:

Press to move on.

Press to reset.

Here's three.phps: http://silo.cs.indiana.edu:9306/0207/three.phps We can rewrite three.php like this: "; $q2 = "Are you really $age years old?"; } else { $q1 = "Welcome."; $q2 = ""; } ?>


Name:

Age:

Press to move on.

Press to reset.

Now we write a simple calculator: UW PICO(tm) 4.10 File: four.php

Amount:

Press to move on.

Change this to use session variables, which brings up the topic:

Amount:

Press to move on.

Sessions look like this: -bash-3.1$ cat sess_45cbda1b0085707bb0df62560e1aab1d balance|i:0;message|s:26:"Welcome, your balance is 0";-bash-3.1$ -bash-3.1$ cat sess_45cbda1b0085707bb0df62560e1aab1d balance|i:23;message|s:18:"Balance is now: 23";-bash-3.1$ We also discussed accidental reloads.