Hi guys,
I made/used an image uploader script today.
This is how the code works now after POSTing the details with a form.
PHP Code:
if (isset($_FILES['new_image'])){
// do image stuff
} else {
// don't do image stuff
}
Basically the image script does work but if the user doesn't enter anything into the image box, the rest of the form functions will work (entering info into a database) but it has messy errors on the page.
How can I create some kind of if statement that says "if they havent entered anything into the image field then dont do stuff" ?
I tried echoing $_FILES['new_image'] but it comes back as "array". I have not used $_FILES before so do not understand this.
Thanks.