Before diving into these exercises, make sure you have managed to run at least one of the examples presented during the web course. They should all work on the students.info.uaic.ro apache server, from your student accounts.
Extending the existing scripts examples (the one in the course or the one here), write a cgi script that displays all the HTTP headers received on the request, along with the content of the request. Call this script from a browser (entering the address in the browser bar). Experiment the same for a script called on submitting a form, both with GET and POST methods. How is the script called? Why? What are the differences between the 3 sets of headers & content? What do these differences mean?
The attached archive hello.zip contains a small application with a script that returns a greeting to every user that inserts their first and last name. Write the POST version of this application (that uses a POST request to get the page with the greeting).
Create a minimal guest book application (using cgi scripts), that would present the user with a form allowing to insert his name and a comment. On submitting this form, the user will get an illustration of his comment (as described by the comments requirement from the previous lab) along with a small thank you note for his comment.
Extend the guestbook application above to store the comment inserted by users in a file, and allow to view all the comments inserted.
For the small application above, also allow one to delete a comment by pushing a button or clicking a link. In addition, allow to display just one comment, by clicking the comment header (commenter name). Take special care of the pages displayed after the comment has been added or deleted, of how these actions are performed, and make sure one can store a bookmark to a single comment if they want.
Write a cgi script which computes and displays the n-th Fibonacci number, where n is a number introduced by the user in a form.
Just for fun, write a cgi script that displays the n-th Fibonacci number, where n is a number introduced by the user in a form, that uses http redirects to implement recursion.