I'm trying to upload an image in a specific folder, but I'm getting nothing, not even an error message, when I click on upload button I get a blank page, and that's it, What am I missing?
<?php if ((isset($_POST["enviado"])) && ($_POST["enviado"] == "form2")) {
$nome_arquivo = $_FILES['userfile']['name'];
move_uploaded_file($_FILES['userfile']['tmp_name'], "../legendofgames/documentos/games/".$nome_arquivo);
?>
<script>
opener.document.form2.strImage.value="<?php echo $nome_arquivo; ?>";
self.close();
</script>
<?php
}
else
{?>
.
<form method="post" enctype="multipart/form-data" id="form2">
<p>
<input name="userfile" type="file" />
</p>
<p>
<input type="submit" name="button" id="button" value="Upload Image" />
</p>
<input type="hidden" name="enviado" value="form2" />
</form>
<?php }?>