em [mailto:[EMAIL PROTECTED]
> åéæé: 2004å12æ12æ 21:58
> æää: [EMAIL PROTECTED]
> äé: [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 :
>
>
Maybe this can help you.
If (empty((string)$Game_rating))
……
-邮件原件-
发件人: Ahmed Abdel-Aliem [mailto:[EMAIL PROTECTED]
发送时间: 2004年12月12日 21:58
收件人: [EMAIL PROTECTED]
主题: [PHP] empty() problem
Hi Group Members
i have a problem with function empty()
i use it to check if user entered the
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
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
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
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 Gr
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
th
7 matches
Mail list logo