<?php if (is_uploaded_file($_FILES['foto']['tmp_name']) and $_FILES['foto']['type']=="image/pjpeg") { ?>