Venkok 0 Posted June 2, 2020 Report 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! Quote Link to post Share on other sites
Larry 428 Posted June 3, 2020 Report 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. Quote Link to post Share on other sites
Venkok 0 Posted June 3, 2020 Author Report Share Posted June 3, 2020 Thank you, Larry! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.