#!/usr/bin/env ruby $KCODE = 'e' require 'cgi' cgi = CGI.new("html4") print("Content-type: text/html; charset=EUC-JP\n\n") opinion = Hash.new studentid = cgi["studentid"] studentname = cgi["studentname"] comment = cgi["comment"] if (studentname == "" || studentid == "" || comment == "") print("必要事項が入力されていません") # exit(1) else opinion[studentname] = comment print("\n") print("\n") print("定番メニューよありがとう\n") print("\n") print("\n") printf("

%sさんの感謝の気持ち

\n",studentname) printf("

学籍番号: %s\n

",studentid) printf("

名前: %s\n

",studentname) printf("

%s\n

", opinion[studentname]) print("\n") print("\n") end