Click to See Complete Forum and Search --> : upload problem
fibre
11-25-2005, 06:01 PM
afater an hour of trying to figure this out im still stuck i used the php tutorial in the html goodies section. The html form is okay and i have set the permitions for the folders to 777. I go to upload the form and it goes tot he getfile.php file and nothing happens. any chance i could get some help
www.concretemonsters.com is where the fileupload is feel free to try and upload some thing to it
thanks in advanced
fibre
SpectreReturns
11-25-2005, 06:03 PM
postsomecode?
fibre
11-25-2005, 06:10 PM
<html>
<head>
<title>Process Uploaded File</title>
<style type="text/css">
<!--
.style1 {color: #00FF66}
-->
</style>
</head>
<body>
<span class="style1"></span><?php
if ( move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],
"public_html/paint{$_FILES['uploadFile'] ['name']}") )
{ print '<p> The file has been successfully uploaded </p>';
}
else
{
switch ($_FILES['uploadFile'] ['error'])
{ case 1:
print '<p> The file is bigger than this PHP installation allows</p>';
break;
case 2:
print '<p> The file is bigger than this form allows</p>';
break;
case 3:
print '<p> Only part of the file was uploaded</p>';
break;
case 4:
print '<p> No file was uploaded</p>';
break;
}
}
?>
</body>
</html>
fibre
11-25-2005, 06:11 PM
<form action="getfile.php" method="post">:
<input type="file" name="uploadFile">
<input type="hidden" name="MAX_FILE_SIZE" value="250000" />
<input type="submit" value="Upload File">
</form>
Sheldon
11-25-2005, 07:00 PM
What is setting the case?
Edit your post and insert the vb tags, eg: [ php ] code here [ /php ]
You have a spelling error "habe" not "have".
Is it good practice to have profound words like the f**k word on your side?
try removing the spaces in $_FILES['uploadFile'] ['tmp_name']
//like
$_FILES['uploadFile']['tmp_name']
fibre
11-25-2005, 07:30 PM
thnks and that comment f u was placed by some one who i let edit my file (that wont happen again) so im sorry fr that. i rewrote the script thank you very much im guessing you uploaded the bruce springsteen pic.
Sheldon
11-25-2005, 08:56 PM
I wasnt offended by the word, just suggesting for others.
So the file was uploaded? Ok thats good, and yes i did upload the picture of the boss.
SpectreReturns
11-25-2005, 09:31 PM
Your form doesn't have the correct enctype, that may be causing a problem.