I have a form in which I have the following input to retrieve an image file from a user in my PHP page:
[code=html]<label for=”compImage”>Computer Photo: </label> <input type=”file” name=”compImage” id=”compImage” />
After choosing a file to upload, when I get to the subsequent PHP file to read in the values from my form, I have the following:
[code=php]$img = $_FILES[“compImage”];
$imgName = basename($_FILES[“compImage”][“name”]);
However, I am receiving an error from these lines that say “Undefined index: compImage”. I don’t see anything wrong with what I have here. Can somebody please help me figure this out?
Chris