Newer
Older
2020-yuuki-t / eiyoukuiz.rb
@結城拓海 結城拓海 on 25 Jan 2023 646 bytes 変更
#! /usr/in/env ruby
# -*- coding: utf-8 -*-

require "cgi"

cgi = CGI.new(:accept_charset => "utf-8")

# print "Content-Type: text/html;charset=UTF-8\n\n"

q1 = cgi["q1"]

print "
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=\"content-type\" charset=\"utf-8\">
<title>判定結果</title></head>
<body>

<h1>判定結果</h1>

<p>%s。%s</p>"

print q1
print "\n"
if q1 === "tr"
    print "正解!!\n"
    print "<a href=\"http://localhost:8080/eiyoukuiz03.html\" >次の問題へ</a>"
elsif q1 === "fa"
    print "不正解…\n"
    print "<a href=\"http://localhost:8080/eiyoukuiz02.html\">問題に戻る</a>"
end
print "</body></html>"