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

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

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Retrieving innerHTML with cURL?
Hey all (sorry I know I'm a leecher, but I soon won't be. This is my first PHP project, but not my l

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

I need help with formatting date from mysql! with php!
Hello guys

*Note: this is a php question not MySQL question, please do not move it to mysql s

php unable to sent email
Hi, guys, I try to send a email through php but unfortunately the mail unable to sent. Here is my co

Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and gi

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

Cloud Computing?
Hello,

I was wondering if anyone could help explain this term to me. I'm starting to hear it

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

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