Re: check null value
| From: | CC Zona | Date: | Tue, 23 Jan 2001 09:08:34 +0000 |
| Subject: | Re: check null value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36155@lists.php.net to get a copy of this message | ||
In article <019301c08581$e9504080$6400a8c0@alsmpdc>,
jacky@activelifestyle.com ("Jacky@lilst") wrote:
> If I have one input text box that when it is submitted to next page, I want
> to check first if it is nothing, then write "na" on next page, else just
> echo whatever it is, is it correct to do this?
>
> if (empty($fieldname)){
> $fieldname ="na";
> }
You might also want to throw in a check for !isset($fieldname), either
before the check for empty() or concurrent with it.
--
CC