my $q = new CGI; my($surname, $givenName); $ENV{REMOTE_USER} = $q->param('Login_Name'); my $room = $q->param('Room'); my $sth; my $table = SQL->new(); my $dbh= DBI->connect("dbi:Oracle:", "scott", "tiger") or die $DBI::errstr; if (!($dbh->selectrow_array("select * from user_tables where table_name = '$table->{name}'"))){ $sth= $dbh->prepare($table->create) or die $dbh->errstr; $sth->execute or die $sth->errstr; } $sth = $dbh->prepare(q/INSERT INTO SignIn(cn, time, cdate, room) VALUES (?,?,?,?)/) or die $dbh->errstr; $sth->execute($ENV{REMOTE_USER}, $foo, $foo, $room); print < ENDOFHTML