-bash-3.2$ pwd /u/dgerman/apache/cgi-bin/0223 -bash-3.2$ ls -l total 24 -rwxr--r-- 1 dgerman faculty 785 Feb 23 12:13 one -rw-r--r-- 1 dgerman faculty 3395 Feb 23 12:30 three -rwxr--r-- 1 dgerman faculty 3310 Feb 23 12:22 two -bash-3.2$ Mon Feb 23 Unix, Apache, HTML, htdocs Perl, Python, CGI, cgi-bin State: hidden fields, client-side Template MySQL, SQL PHP: sessions (server-side state) Perl, Python, CGI: can you keep server side state? The answer is: yes, see Homework Five We will use MySQL to store state/session information Next week: exam Individual appointments: http://silo.cs.indiana.edu:46016/cgi-bin/spr2009appts001/schedule Midterm/Final: take home exam Basic description: you throw five dice, you decide whether you want to keep the combination or not. You can decide to roll some of the dice again, you do this by checking those dice that you want to keep and pushing Proceed, to roll the other dice again. You can do this twice. At any point if you like your combination you can store it, after you throw the dice two extra times you have no choice but to store it. The game ends when you have stored six combinations of five dice, which need to be shown as you play the game. You are trying to get as many points as possible, each combination is worth the sum of the dice in it. Homework Five: Flag Quiz in CGI/Perl with state on the server side. Go in as lbird, use database awards (lazy) and create table: mysql> create table hwFive ( -> session_id char(8) primary key, -> message varchar(240), -> questions varchar(240), -> correct int, -> total int, -> anskey varchar(32), -> modified timestamp -> ); I start developing the program in ~/apache/cgi-bin/0223/one --------------(first version of the program)--------------- one --------------(second version of the program)--------------- add the definitions to the end of the program add the code that reads stuff (input, and state) ------------------------------------------------------------