Upload simple problem


Posted on 16th Feb 2014 07:03 pm by admin

Really confused!! I run once and it worked, but when i tried today...it didn't work

Which part is missing

Did you know?Explore Trending and Topic pages for more stories like this.
if(isset($_POST['upload'])){
$filename=$_FILES['file']['name'];
$filetype=$_FILES['file']['type'];
$filesize=$_FILES['file']['size'];

if(empty($filename)){
$warning="<span class=style2><font color=red>* You did not upload any file</font></span>";}else

if((!empty($filename))&&($filetype!='application/msword')){
$warning="<span class=style2><font color=red>* Word document only allowed to be uploaded</font></span>";
}else

if((!empty($filename))&&($filesize>120000)){
$warning="<span class=style2><font color=red>* File size exceeds maximum allowed</font></span>";
}else{

COPY TO UPLOAD BLABLABLA..}


THe problem is that when i upload the word document with less than 120 kb filesize, "* Word document only allowed to be uploaded"
No comments posted yet

Your Answer:

Login to answer
319 Like 19 Dislike
Previous forums Next forums
Other forums

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

my login script page is not working on remote computers
hi my login is working on my computer, but when i tried 2 computers from 2 different locations, they

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:

Code: header("Cache-Cont

Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyon

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash