Posted by Kim Andrι Akerψ on 09/28/50 11:57
cronoklee@hotmail.com wrote:
> Does anyone know why this if statement is equating to true when the
> field in question is NULL in the MySQL table?
>
> if(!empty($userinfo['info1'])){echo 'NOT EMPTY!';}
>
> I have tried this also:
>
> echo "INFO IS:".$userinfo['info1'];
>
> which results in:
> INFO IS:
>
> What the hell is goin on?
>
> Thanks a lot!
> CiarΓ‘n
Where did you put your echo statement? Inside the brackets in the above
if-statement?
You could also test the value with is_null(), although empty() should
consider NULL as an empty value.
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|