if we have
$allowimg = array('gif','bmp','jpg','png','jpeg','tif','tiff','tga','psd');
and want to make upload center with it if we put this code
if(in_array($filetype,$allowimg)){
//pic
$error = 0;
$filedoc = 'pic';
}
else{ echo 'bad file type!';}
if user upload my.PNG
its run Else cuz PNG is not == png for php
can anyone help me with this?
and how to secure from file uploads?
$filename = explode('.',$nn);
is ok? so what if user upload
my.pic.jpg?