Re: Easy Question -- Show/ Hide text based on output of query
| From: | Jason Wong | Date: | Tue, 05 Feb 2002 18:21:33 +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-83615@lists.php.net to get a copy of this message | ||
On Wednesday 06 February 2002 02:14, Edward R. Bailey wrote:
Please keep the discussion on the list!
> Thanks for responding! Yes the "memberNotes" database field only
> contains information in about a third of the records so I wanted to hide
> the entire field and label when their was no relevent data.
>
> I made the change you suggested, but the field label does not show up
> when "memberNotes" contains data. As follows is the current script. Is
> what what you suggested?
>
>
> <?php If ($memberNotes) {
> $notes = "<div align=\"/left\"/><font
> size=\"/-1\"/><b>Notes:</b></font></div>";
> } else {
> $notes = "<div align=\"/left\"/><font
> size=\"/-1\"/><b></b></font></div>";
> }
> ?>
What are those forward slashes (/) doing in $notes? Try getting rid of them,
they don't look very HTML to me :)
Also try echo($notes) OUTSIDE of a <table> construct to see what it contains.
hth
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Q: What do Winnie the Pooh and John the Baptist have in common?
A: The same middle name.
*/