I am trying to combine two variables but have not been successfull. Here is the scenerio:

A page is generated with X number of entries and by each one of those entries is a CHECKBOX named delete1, delete2 ... When the user selects one or more of these boxes and presses delete, I want the script to go and delete all the respective entries from the database. I can't get the variables to combine however.


this is the line that is passed on to the delete script, in this case the user selected entry 1 and 3 to be deleted:


I am trying to combine two variables like so:

for ($cnt=1; $cnt <= $obj; $cnt++) {
$delete = ("$delete$cnt");
print "$delete";

The $delete var is not attaching the $delete values passed from the other page but only the $cnt value giving me a big incremental number.

How can I fix this, or what is a better way to approach this type of deletion?