I have the following form.
<form action="picture.php" method="POST" class="pic_form">
<span class="picture_box">
<input type="file" accept="image/*" name="pic_upload" class="picture_upload_input" />
<p class="upload_info">Only file types of the extensions gif, jpg, png and svg are allowed. The maximum file size is 15mb. If your file is larger than 15mb, it will not upload.</p>
</span>
<input type="hidden" name="uid" value="<?php echo $_SESSION['userid']; ?>" />
<input type="button" name="upload_button" value="Upload" class="upload_button" />
</form>
I validate that the file is set and that it's of the correct type and size using jQuery. When I submit this form (using jQuery), the field is posted
$_POST['pic_upload']
This returns true.
However, the file itself isn't posted
$_FILES['custom_pic_upload']
This returns false and
var_dump($_FILES['custom_pic_upload']);
returns null.
How do I make the file itself upload?