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
Did you know?Explore Trending and Topic pages for more stories like this.

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

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

utf8_general_ci error ??
I have all kinds of data to be inserted in database table

//I am getting this error

Yo

how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Consuming third party Payment Gateway API from Procedure.
Hi All,

First of all i would like to thank all the people of the oracle forum for providi

Need help Updating SQL Server Express DB from c# :(
Please can anyone help with:-
1 How to sructure the strSelect statement.
2 How to instruct

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

PHP Search Issue
Hi, I am using the following code to search and return flights from a database. The user searches by

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

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