Parinay Bansal wrote:
$sth = $dbh->prepare("insert into loginout values ($ref->{'CARD_ID'}, '$name' , now(), NULL");
It is missing a closing paren. Could be something else wrong too. As a note in my experience it has been considered a best practice to explicitly name fields. The advantage to that is that it allows the database itself to be changed without impacting code. So rather than insert into mytable values(x,y) use insert into mytable(col1, col2) values(x,y)