class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
But you need to instantiate the class with an upload field, that is an value from the array $_FILES. In your code, it seems that your upload file (input type="file") doesn't have a name. It should, and then you use this name to find the correct value in the $_FILES array.
Look at the code sample in the class itself, it is a minimal example showing how to create a form and instantiate the class. In your case, your form fields are incomplete, and cannot work.Reply
But you need to instantiate the class with an upload field, that is an value from the array $_FILES. In your code, it seems that your upload file (input type="file") doesn't have a name. It should, and then you use this name to find the correct value in the $_FILES array.
Look at the code sample in the class itself, it is a minimal example showing how to create a form and instantiate the class. In your case, your form fields are incomplete, and cannot work.
$handle = new Upload($_FILES['attachment']);
Works great now. Thanks so much for the quick responses!