in reply to Accept array from Form and put in DB

The problem in your code is that $quantity appears to be undecleared when you first use it. strict has surely told you already.

If you want do do something on every element of a list but you only have the code to do it on a scalar, use map:

@quantity = map $dbh->quote($_) , @quantity.

And unrelated but important: check the return value of do() in order to notice errors. Forget these words if you have RaiseError/PrintError enabled.

--
http://fruiture.de

Replies are listed 'Best First'.
•Re: Re: Accept array from Form and put in DB
by merlyn (Sage) on Dec 09, 2002 at 15:39 UTC