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

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

PHP Cannot redeclare class
I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot rede

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

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