upload photo limits


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

ive got a upload photo script and im just trying to make more secure currently it limits size and as you can see from my code below it limits only gif and php files

how do i edit my code to limit all these or do i have to copy and paste the same code and change the file extention?
jpg, jpeg, pjpeg, PJPEG, JPG, JPEG, gif, GIF, png, PNG

Code: if (!($uploaded_type=="image/gif")) {
echo "You may only upload GIF files.
";
$ok=0;
}

also ive restricted php is there anything else i need to restrict?
Code: if ($uploaded_type =="text/php")
{
echo "No PHP files
";
$ok=0;
}

No comments posted yet

Your Answer:

Login to answer
284 Like 33 Dislike
Previous forums Next forums
Other forums

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

how to query data from website using VC?
I want to query some datum from a website,so I need a program to read data from a .csv file, and ass

Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.

Code: <?
$timenow=time();

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan

DYNPRO_FIELD_CONVERSION
Hi gurus,

I got a dump when I run one of my program. the dump is described below:

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