[eluser]Bramme[/eluser]
Hey all,
I need to check if an input type="file" is set or not. I tried it with
Code:
if(!empty($_FILES['userfile'])) {
but that's not working... Is this possible, or do I have add an additional checkbox that needs to be checked if you want to upload the selected file (maybe with some javascript that auto selects it when you click the "browse" button).
Thanks
edit: lazy me: should've googled better.
Code:
if(!empty($_FILES['userfile']['name'])) {
Provides the solution!