If I want to check if element(e.g. $_POST['name']) exists I do that:
A.) if(isset($_POST['name']))
If I want to see if element exists and is not empty, I do B.) or is it C.) enough?
B.) if(isset($_POST['name']) && !empty($_POST['name']))
C.) if(!empty($_POST['name']))
I've tried and C.) worked fine, but reputable school always used B.) approach and I asked my instructor there and she said I should use B.) approach, although I am not clear why and I decided to ask here to be sure and not to do an overkill if it is not necessary. [They didn't explain me why.] Can You give me some examples why I should use B.) over C.)?
Thanks and have a great and good day, Gregor Leskovšek from Slovenia