Hi,

sentinel wrote:

> $my.query("insert into agent(_case, name1, name2) values
> (cgi.params['_case'], cgi.params['name1'], cgi.params['name2'])")
> 
> it will write to the database, but the values will be literally what
> is shown - i.e. cgi.params['name2'], etc.
> 
> I'm probably missing something obvious, but how can I insert the hash
> values into the INSERT values ?

Using DBI it might look like this:

parms=... # Get params from CGI
dbh=DBI.connect('DBI:Mysql:databasename','username','password')
insh=dbh.prepare('insert into agent(_case,name1,name2) values(?,?,?)')
insh.execute([parms['_case'],parms['name1'],parms['name2']])

I wouldn't use cgi.params directly, because I would like to 
check whether all params are present (and maybe perform some 
more checks and/or conversions, too) and because it contains 
Array values, as CGI params may be multi-valued.

Regards,
Patrick