Re: Checking for empty()
| From: | Ashley M. Kirchner | Date: | Wed, 14 Jun 2006 18:17:41 +0000 |
| Subject: | Re: Checking for empty() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237995@lists.php.net to get a copy of this message | ||
Brad Bonkoski wrote:
Weel, since this is a PHP list I will assume you are checking once the page is posted/submitted... That would be correct. At the moment I'm checking with
if (empty($_POST['var'])) { throw error flag }
But as I read up on empty() I realized that if one simply hits a space and/or a return, empty() will fail.
off the top of my head, the functions strlen() and isset() come to mind. Will look into them. Danke.-- W | It's not a bug - it's an undocumented feature. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.