I have a form that has an option to upload an image along with some text and a title. What I want to do is check if the input for uploading the image is empty. If it is then the page processes the code just to upload the text portion to the database. If it isn't empty then it processes the code that uploads the image as well as the text.
I used
if (!$_POST['image']) {
which at first I thought did the trick but when I tried uploading an image it didn't work. I know for a fact that the code for uploading an image works as I've used it on another page to test it. So I'm left to believe that the conditional statement is the source of the problem.
Is there another way of checking if someone has browsed and chosen an image file for uploading?