Reputation: 1129
Can someone show me some example code on how i would check to see if someone picked a file in the file input field as i only want to display a message if they have.
Cheers,
Upvotes: 1
Views: 121
Reputation: 10490
well if you want it to do it while they were using the form you would need to use javascript you can see it be done here
how to check if a file is selected using javascript?
you want a php solution one way can also bee seen in the same topic
this is for multiply files
foreach($_FILES['item']['size'] as $k=>$v){
if($v>0)
//Do something
}
try that
Upvotes: 1