What common mistake is the user making when trying to upload an image in PHP?

The common mistake the user is making when trying to upload an image in PHP is not setting the enctype attribute of the form to "multipart/form-data". This attribute is required when uploading files through a form in PHP. To solve this issue, simply add enctype="multipart/form-data" to the form tag.

<form action="upload.php" method="post" enctype="multipart/form-data">
    <input type="file" name="image">
    <input type="submit" value="Upload Image">
</form>