I do not know what I'm doing wrong, I try to restrict the files I want to upload ..
<pre>
<?php
$nombre = $_POST['nombre'];
$foto = $_FILES['foto']['name'];
$archivo= $_FILES['foto']['tmp_name'];
$tipo= $_FILES["foto"]["type"];
$size= $_FILES["foto"]["size"];
$permitidos = array("image/gif","image/png","application/PDF",image/jpg");
$limite_kb = 200;
if(in_array($tipo, $permitidos) && $size <= $limite_kb * 1024){
echo 'si funciona ';
} else{
echo 'no funciona el tipo de datos';}
}
</pre>
It always gives me the same result with any file ....
Thanks in advance.