Re: Easy Question -- Show/ Hide text based on output of query
| From: | Jason Wong | Date: | Tue, 05 Feb 2002 17:52:06 +0000 |
| Subject: | Re: Easy Question -- Show/ Hide text based on output of query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83613@lists.php.net to get a copy of this message | ||
On Wednesday 06 February 2002 00:03, Edward R. Bailey wrote:
> Hi,
>
> I am working on a page the displays the output of a query in a table and
> I only want to show the field labels that have corresponding output from
> the database. I am only really concerned with the last label in the
> table.
>
> The label is called "Notes" and the corresponding field in the database
> is "memberNotes"
>
> So I wrote the following script where I think I am saying if memberNotes
> returns any value then print the output of $notes in the table cell
> where it is called, but nothing happens and the output of $notes is not
> displayed regardless whether "memberNotes" has any output.
>
> <?php If ($memberNotes =='1') {
What is $memberNotes supposed to contain? If it is supposed to contain notes
on members then surely it can't be '1' all the time?
I think you probably want:
if ($memberNotes) { ...
hth
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Where is John Carson now that we need him?
-- RLG
*/