#!/usr/bin/env ruby $KCODE = 'e' require 'pg' require 'cgi' cgi = CGI.new("html4") print("Content-type: text/html; charset=EUC-JP\n\n") id = cgi["id"].to_i time = cgi["time"].to_f position = cgi["pos"].to_f sql = "INSERT INTO position(id, time, position) VALUES (\'#{id}\',\'#{time}\',\'#{position}\')" pg = PGconn.new("localhost",5432,'','',"ta05001","postgres",'') result = pg.exec(sql) result.clear pg.close print <<__EOF__ 結果入力動作

データ入力要求

入力しました。

__EOF__