The first problem is that your IF(...) statement -
if ($HTTP_POST_VARS["deletewhich".$i] == "on") { - won't ever be true because you have specified values
value="bracelet.jpg" in the form. Instead of "on" you will receive the values "bracelet.jpg", "earrings.jpg", and "necklace.jpg"
To illustrate this, put the following code in your .php file to display all the $_POST values -
Secondly, I don't think the
".$i] syntax in $HTTP_POST_VARS["deletewhich".$i] is correct, but I could be wrong as the HTTP_POST_VARS is older syntax. If this was using the $_POST global variable, the correct syntax would be something like this -
Lastly, unless this is part of your upload file script, the $_FILES variable will not be set to anything (why upload a file, then deleted it) and the following line does not make sense and is probably not doing anything -
Edit: If you want to see/find out more about what is happening good/bad during the execution of your php script, put the following line near the start of your php file -
This is especially useful when debugging code or when just learning.