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

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

My XSRF Prevention code isn't working
First of all, thanks for the generous help you guys have given me in the past on this forum.
Seco

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this

('date' => '20

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Linux socket programming
Where can I find a good introduction to socket programming?

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