I want to upload an image from the users machine to the webserver. The code is saying ok but the file is not uploading.
Please can someone let me know where I am going wrong. It may be i ahve missed out loads of lines of code!!!
(thats women for you!)
<?php
if ($HTTP_POST_FILES['uploadedFile']['size']<=0)
{
print "NO way";
}
else
{
$tempfile = $HTTP_POST_FILES['uploadedFile']['tmp_name'];
$destination = "/gifs/";
copy($tempfile, $destination);
print "OK";
}
?>
I am using php 4.3.3
any help appreciated
Nuts
uploading a file to the server
Moderator: General Moderators
-
nutstretch
- Forum Contributor
- Posts: 104
- Joined: Sun Jan 11, 2004 11:46 am
- Location: Leicester
Try the example form (and code below) at http://www.php.net/manual/en/features.f ... ost-method and see fit hat works ok for you, then at least you know that uploads in general work ok.
-
nutstretch
- Forum Contributor
- Posts: 104
- Joined: Sun Jan 11, 2004 11:46 am
- Location: Leicester