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

Sequre login with cookies.
I want to build secure login with cookies. I just want your ideas about this, your suggestions. What

Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

compile php5 with DOM
Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of

cURL proxy
Okay here is the thing... i know how to add proxys

Code: curl_setopt($ch, CURLOPT_PROXYTYPE,

Empty text file when there is over XXXX lines of text.

define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

if statements problems
Hi. I'm trying to make a web form, but I kind of hit a dead end trying to figure out why it doesn't

Why does my crawler script suddenly end with no error?
Hi.

I have written a web crawler script. It will visit a large number of URL's with cURL.

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