<?php
if(!empty($_FILES)) {
if(is_uploaded_file($_FILES['upload_file']['tmp_name'])) {
$sourcePath = $_FILES['upload_file']['tmp_name'];
$targetPath = "images/".$_FILES['upload_file']['name'];
if(move_uploaded_file($sourcePath,$targetPath)) {
?>
<img src="<?php echo $targetPath; ?>" width="100px" height="100px" />
<?php
}
}
}
?>