$foto = $_FILES['foto'];

if ($_FILES['foto']['tmp_name'] != "") {