uploading a file to the server
Posted: Mon Mar 08, 2004 9:12 am
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
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