in reply to Perl with Insert query

You have not bound any arguments to your placeholders. Neither have you checked the results of any of your DBI method calls which would have alerted you to there being a problem.

my $res = $sth->execute ($session_id, $employeename); warn "Cannot insert $session_id, $employeename into employee_details ( +res is $res): " . $dbh->errstr unless $res;