Re: empty() problem

From: Date: Sun, 12 Dec 2004 15:03:44 +0000
Subject: Re: empty() problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204107@lists.php.net to get a copy of this message
trim it then use an operator..eg if(trim($Game_rating) == '') { // error .. } ----- Original Message ----- From: "Ahmed Abdel-Aliem" <me2resh@gmail.com> To: <php-general@lists.php.net> Sent: Sunday, December 12, 2004 8:58 AM Subject: [PHP] empty() problem > Hi Group Members > i have a problem with function empty() > i use it to check if user entered the form fields and store it in array > > for example : > > if (empty($Game_rating)) > $errors[] = "You didn't enter the Online Status for the Game."; > > the problem when the user enters 0 in the form field > the empty function returns the error. > > can i use another function that doesn't return false when the 0 is passes ? > > any help plz ? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

« previous php.general (#204107) next »