word/quiz: report table to save user actions
[sheet.git] / word / report.plp
1 <:
2 my $db = eval {
3         require Shiar_Sheet::DB;
4         Shiar_Sheet::DB->connect;
5 } or Abort('Database error', 501, $@);
6
7 $db->insert(report => {
8         agent   => $ENV{HTTP_USER_AGENT},
9         page    => $ENV{HTTP_REFERER},
10         address => $ENV{REMOTE_ADDR},
11         history => $PLP::read->($ENV{CONTENT_LENGTH}),
12 });