I am creating an admin interface for a content mangement web site. I am attempting to create an image upload feature to add images to articles via a web form. The form calls 'uploadimages.php'. which is designed to move the uploaded file to a directory on the server, while inserting the file name into a MySQL database.
For some reason I cannot access the $HTTP_POST_FILES array of the uploaded image.
At the beginning of my code, I am running a check to see that the array has elements:
if(!isset($HTTP_POST_FILES['picture']['name']))
{
echo 'No name found.';
exit;
}
When the form calls this page 'uploadimages.php', it displays 'No name found.' and exits, as though the $HTTP_POST_FILES name element is empty.
The URL in the browers shows:
uploadimages.php?pic1=C%3A%5CMy+Documents%5Cadmintitle.gif&pic2=&pic3=&Submit=Submit
What am I doing wrong here? The URL shows the information that is being passed from the form, but I cannot access the $HTTP_POST_FILES array to work with the file.
Your help is appreciated!
Devin