To get all selected(checked) items in a array, you need to set the name in the form to Select[] and you will be able to access all the checkboxes as an array($_POST['Select']). And one more thing you have to defined the value for each checkbox, because the value is going to be posted by the form. So define the value so that you can able to know which image has been checked by user.

There are a few problems here; my favorite is an error line 9 of your supposedly 3 line file. That one is referring to the extra [] after the $_POST['select'] in the line you posted. When you remove that though, best case scenario you're going to get another error, or your output is just going to read 'array'. you can't echo an array as an string unless you implode or join the elements. you have to print() or print_r() it, most prefer to do it like this:

echo '<pre>Your array:<br />';//the pre tag makes it more readable, but try it with and without so you seeprint_r($_POST['Select']);//play with this one also to see how associative and indexed arrays appear.

Also, just name your checkboxes with the filenames instead of trying to make an array etc. You're doing way more than you need to. the $_POST array will only contain keys (with the name of each control being the key) for the checkboxes that are checked. That means you can just do:

if ($_POST){//some older versions want you to use isset() but if you're up to date this will workforeach ($_POST as $fname){//your code here for each file}

just make sure you don't name your submit input or you'll get more errors. Also, make sure you're cleaning those filenames in your code before doing anything with them, and using is_readable() and/or file_exists() to save yourself some headaches.

Don't get discouraged, learning php or anything else is a process, and once you start getting it, everything will start falling into place. Here are some great, free, video primers to help you get started. http://jream.com/learning/videos/php-basics He usually does a pretty good job about explaining complex concepts in plain English. He sometimes flies through examples kind of quickly, but the beauty of a video is you can rewind it as many times as it takes to get it, or pause it to copy and play with his code.

Every person who's ever learned php was right where you are at one point or another, and there are an abundance of resources online and people who want to help.

Just wondering - to improve this further, is there a way in php that rather than having checkboxes I could have two list boxes... one on the left with available, and when you double click it jumps to the right hand box called selected. Then you can double click to make them jump back etc

It's possible, but is actually more of a pain in the butt, requiring javascript or jquery to update the lists and provide real time responsiveness. I've posted a script sometime within the last month or so of code to do exactly that, but if you want to go that route, i'll leave it to you to find it. It was on this forum, probably early march.