|
It doesn't do anything? Does it echo one of the two messages you have in the function, or is it failing silently? If it's failing silently, you may want to enable error reporting or set it to E_ALL.
The function seems to both resize the image and upload it, despite its name, so is it possible that you are uploading the image twice somewhere else in your code? Perhaps first as a resized image, then later overwriting it as the original image?
You don't need to return anything for a function; whether you do or not is up to you and what you need.
Also, it's good practice to use imagedestroy() on your image handlers once you are done with them. It's not strictly necessary in this case though.
|