Digital Media Technology S00, Session 4 (10.-13.10.)


You may need some instructions how to run CGI scripts at the department: http://db.cs.helsinki.fi/~oheinone/cgi-howto.html

  1. Complete your form from the exercise 2.1 to include some fields with prices (like how much the tickets to a concert cost). Make a CGI script in PHP which reads the fields of a form and returns to the user an HTML page which contains the information how much the user has to pay. The instructions for paying have also to be included (varies according to the type of paying: credit card, bank account...).

  2. In this exercise, queries are made to a database called Home Rental Database. More information on the database can be found from page www.cs.helsinki.fi/group/dime/harj/vuokraus.html. The page also contains a link to a set of sample SQL queries, which can be used in the solutions.

    Implement a PHP script which prints a form that asks for a number of rooms. When the user submits the form, those apartments are given which have the required number of rooms. Check that the input is not negative and notify the user if it is. You can show the result, e.g., in a table.


Helena Ahonen-Myka
Last modified: Sep 27 2000