Question: So I have the issue that I am trying to post a variable which is the name of a form input checkbox. However, this name is a variable. When I view page source it shows the name as what I want it to however when I have:

```
$files_name = $_POST['$file_name'];

```

Which works for the other elements that I have, it does not send the value that $file\_name has. I assume it may have something to do with concatenating variable but I've looked up how it is that I'm supposed to do this but I can't work out how to do it or what to do.

---

I have a new kind of issue. This is because whenever I try to show the value of $file\_name at any stage, for some reason it is blank EXCEPT when used in the name="$file\_name" in the form, almost as though it loses its value.

Answer: 
Making `item` final should solve your problem:

```
final String item = itemsList.get(i);

```

You can't access a non-final local variable from an inner or anonymous class like this.
You need to use the `final` keyword. 

Try `final String item=itemsList.get(i)`;

Since the anonymous object captures the `item` variable, it doesn't make sense to modify it after. Hence you need (*have*) to make it immutable.