Check for $_FILES
I am trying to create a check in my code to see if an image was selected in my form
doesn't seem to work, as in it keeps telling me is NOT set even when I select an image to upload. I've heard of using
but don't seem that working either...
if($_FILES['image']['name'] != "")
Did you include enctype="multipart/form-data" in your <form> tag?
How about either echoing or logging what's in $_FILES just to see if you're actually getting anything, and if so, how the array is indexed and such (remember that array keys are case-sensitive, just in case):
echo "<pre>".print_r($_FILES, 1)."</pre>\n";