PHP gevorderde |
|
if($_FILES['userfile']['size'] > 0)
if($_FILES['userfile']['size'] > 0)
<input name="userfile" type="file" id="userfile" style="width:250px;">
<input name="userfile" type="file" id="userfile" style="width:250px;">
Ik controleer op grootte... Maar normaal zou name ook moeten werken.
Anders:
http://be.php.net/ schreef: If $_FILES is always empty, check the method of your form.
It should be POST. Default method of a form is GET.
<form action="myaction.php">
<input type="file" name"userfile">
</form>
File will not be uploaded as default method of the form is GET.
<form action="myaction.php" method="POST">
<input type="file" name"userfile">
</form>
Files will be uploaded and $_FILES will be populated. |