I'm looking for a simple way to check to see if a file input field has a value. I have an upload field, however, if they choose to put something in that field, it will replace the existing item in the database. This is what I want, however, if they leave it blank, it erases the existing item in the database. How can I check to see if the file input field has a file in it?
I've tried:
Thanks!
_______________
_brian.
I've tried:
Code:
if(empty($_FILES['attachment']['name']) || $_FILES['attachment']['name'] == ""){
Thanks!
_______________
_brian.