in reply to Mysql error near values(

Originally there were quotes around all variables in the values() but I took them out thinking they were the problem.

There's a reason single quotes would have been there, unless the variables in question are already $dbh->quote 'd, then the correct syntax for the INSERT statement calls for the data to be quoted.

From the limited snippet you supply, that's about all one can ascertain.

Scott