[Solved] Upload image php


1.turn on error reporting in php.ini file or add this line at first:

<?php error_reporting(E_ALL); ?>

2.It seems that u have an syntax error on line 4: forget to close php code by ?>

<?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
{?>

3

solved Upload image php