I have a form processing script which I want to use for inserting values into the database. The form stores the items from a shopping cart. The names of the hidden form boxes go like this. code0, item0.. code1, item1.. etc.

So I had the idea for using isset on a constructed variable name. But all attempts have failed.

The second part of constructing the SQL string also doesn't work, it just inserts the value of $i instead! This was tested independently of the isset part.