Re: [PHP] empty() problem

2004-12-12 Thread adwin wijaya
Ahmed Abdel-Aliem wrote: 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 enter

Re: [PHP] empty() problem

2004-12-12 Thread Craig Slusher
I use this function which I find is very useful: function isEmpty( & $var ) { return isset($var) && strlen(trim($var)) == 0; } On Sun, 12 Dec 2004 10:12:34 -0500, John Holmes <[EMAIL PROTECTED]> wrote: > Ahmed Abdel-Aliem wrote: > > > > Hi Group Members > > i have a problem with function e

Re: [PHP] empty() problem

2004-12-12 Thread John Holmes
Ahmed Abdel-Aliem wrote: 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 enter

Re: [PHP] empty() problem

2004-12-12 Thread Sebastian
trim it then use an operator..eg if(trim($Game_rating) == '') { // error .. } - Original Message - From: "Ahmed Abdel-Aliem" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 12, 2004 8:58 AM Subject: [PHP] empty() problem > Hi Group Members > i have a problem with f