i'm working to an image uploader, but i don't recive any file or information from the html form. So, this is the html code:
<html>
<head><title></title></head>
<body>
<div id="page">
<div id="content">
<form action="pages/post/upload.php" method="post">
<input type="file" name="userfile" required/>
<input type="submit" name="send" value="Invia"/>
</form>
</div>
</div>
</body>
</html>
And this is the php code
<?php
$uploaddir = '/home/pino/Scrivania/Prova/upload/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
print_r($_FILES['userfile']['name']);
print_r($uploadfile);
print_r($_FILES['userfile']['tmp_name']);
echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{
echo "File is valid, and was successfully uploaded.\n";
}
else {
echo "Invalid File!\n";
}
echo 'Any information to debug:';
print_r($_FILES);
print "</pre>";
?>
I trid to print any information of the $_FILES array but i don't recive any information.
There are specific information to declare or import into the sources?