Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote, and it still gives me the message that it failed to upload.
Also, I actually want to force a name change to the file, so that regardless of what the name of the file uploaded is, it gets changed to "imagefile.jpg". I did try it exactly as you suggested, and it didn't work so I think there is something else I'm doing wrong. But I thought I should mention now that I want to impose my own name on the file, to save confusion later.
Here is the whole if() statement:
if(move_uploaded_file($_HTTP_POST_FILES['upfile']['tmp_name'],rawurlencode($store_dir. "imagefile.jpg")))
{
echo("Uploaded ".$HTTP_POST_FILES['upfile']['name']." successfully.");
}
// If the copy function fails output a message.
else
{
echo("Upload of ".$HTTP_POST_FILES['upfile']['name']." to ".$store_dir." failed.");
}
-- Dave Gutteridge dave@xxxxxxxxxxxxxxx
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php