Click to See Complete Forum and Search --> : uploading problem


eina_227
11-29-2004, 12:32 AM
hai frenz....thank to who reply my thread b4..anyway i got another problem..i have created an upload file and it works. but my prob is when i try to upload the file that exceed the limit size, it still appear that the uploading process succesfull and the data appear at the table but with no file name and file size are 0.. what happen actually?i dont know how to solve it..please help me...i try many solution but it not works..
<html>
<head>
<title>Title here!</title>
</head>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="2M">
Select a file to upload! <input type="file" name="userfile"><br>
<input type="submit" value="Upload!">
</form>
</body>
</html>

Genixdeae
11-29-2004, 09:06 AM
change:
<input type="hidden" name="MAX_FILE_SIZE" value="2M">

to:
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">

that should fix it.

also on the page where it reads what was submitted on the form put a statement like this near the top:
if($_FILES["userfile"]["size"] > $_POST["MAX_FILE_SIZE"]) {
The file is to large
}else{
script
}

eina_227
11-29-2004, 10:46 PM
i have try that script and it works..but when i try to upload the file with 10 MB, the error not appear and it just refresh the page.. how the make the error appear. i've try to upload the 4MB file and file and there is no problem and error appear..but for the 10MB and above the error not appear..