4: | Add to the Stirbucks program a cookie that will save the user's preferences so that each time he orders coffee, he will get a free sweet. If he doesn't state a preference, he will get a bagel with his coffee. The bagel or the alternate choice for a free sweet is saved in a Netscape cookie. The cookie should not expire for 1 week. (See Figure C.42.) Figure C.42. Cookie output. |
5: | Write a CGI script (with the CGI .pm module) that will replace the ATM script you wrote in Chapter 11. The new CGI script will provide a form in the browser that will produce a menu of items; that is, deposit, withdraw, balance, etc. Use the object-oriented CGI methods to create the HTML form. In the same script, the param function will check which selection was checked, and, based on the selection, the appropriate method will be called from Checking.pm . After the form has been filled out and submitted, the results of processing will appear on the same page. |