note 42914 deleted from function.empty by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 28 Jun 2004 15:23:41 +0000 |
| Subject: | note 42914 deleted from function.empty by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72052@lists.php.net to get a copy of this message | ||
Note Submitter: stry_cat@yahoo.com
----
Someone said:
"The isset() function is very helpful to find if a form field was submitted as blank. I could
give an example but I think somebody alreay did in here.
My point is that isset() and empty() are redundant but they do allow you to program in
error_reporting(E_ALL) without warnings or notices, which usually means more secure scripts..."
Responce:
This is incorrect. If a form field is left blank when submitted,
isset($_REQUEST["field"]) will return true b/c there is a blank/null in the field.
However empty($_REQUEST["field"]) will also return true b/c there is a blank/null in the
field. isset is not helpful in this case. empty is extremely helpful.