Venkok Posted June 2, 2020 Share Posted June 2, 2020 Hi to all! This script works identically without ! empty conditional, am I right? if (! empty ($_POST['name']) && ! empty ($_POST['email']) && ! empty ($_POST['comments'])) { } the same as: if (($_POST['name']) && ($_POST['email']) && ($_POST['comments'])) { } Thank you! Link to comment Share on other sites More sharing options...
Larry Posted June 3, 2020 Share Posted June 3, 2020 Ah, in theory, yes, but the latter version--without !empty()--would create PHP warnings under some circumstances, so the !empty() version is "safer" and more professional. Link to comment Share on other sites More sharing options...
Venkok Posted June 3, 2020 Author Share Posted June 3, 2020 Thank you, Larry! Link to comment Share on other sites More sharing options...
Recommended Posts