Re: if field is empty don't display the link (or field)
| From: | fkeessen at planet dot nl | Date: | Fri, 18 Apr 2003 11:52:08 +0000 |
| Subject: | Re: if field is empty don't display the link (or field) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144399@lists.php.net to get a copy of this message | ||
Hi,
Replaced (ISSET()) with (!empty) and it's solved
Regards,
Frank
>> Can you please help me with the following? What i'm trying to do is; when
>a field of an query is empty don't display. But if the field has a value,
>display a link.
>>
>> The result of the following code i've written is: When all fields or if
>one of the tree fields is filled in , all three 'menu options' are
>displayed.
>>
>> For the good order; what I want is this: when only the field 'eten' has a
>value, only that link is displayed.
>[snip]
>> if (isset($row2->eten))
>> {
>> ?>
>> <a href="steden.php?stedenid=<? echo $row2->stedenid;
>?>&subj=eten">Eten</a></font>
>> <?
>> }
>
>Use empty() instead of isset().
>
>if(!empty($row->var))
>{ //display link here }
>
>Same thing for the rest of your links, if I'm understanding you correctly.
>
>---John Holmes...
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>